rprojroot: Finding Files in Project Subdirectories
- CRAN: http://cran.r-project.org/web/packages/rprojroot/index.html
- GitHub: https://krlmlr.github.io/rprojroot
- Vignettes: Finding files in project subdirectories
> library(rprojroot)
バージョン: 1.0.2
関数名 | 概略 |
---|---|
criteria |
Prespecified criteria |
find_root |
Find the root of a directory hierarchy |
find_root_file |
File paths relative to the root of a directory hierarchy |
root_criterion |
Is a directory the project root? |
criteria
> is_rstudio_project
Root criterion: Contains a file matching '[.]Rproj$' with contents matching '^Version: ' in the first 1 lines
find_root
> dir(find_root("README.md"))
[1] "abind.md" "abind.Rmd" "assertr.md"
[4] "assertr.Rmd" "base.md" "base.Rmd"
[7] "broom.md" "broom.Rmd" "chunked.md"
[10] "chunked.Rmd" "compareDF.md" "compareDF.Rmd"
[13] "csvy.md" "csvy.Rmd" "daff.md"
[16] "daff.Rmd" "data.table.md" "data.table.Rmd"
[19] "datacheck.md" "datacheck.Rmd" "datacheckr.md"
[22] "datacheckr.Rmd" "diffr.md" "diffr.Rmd"
[25] "digest.md" "digest.Rmd" "dlstats.md"
[28] "dlstats.Rmd" "dpmr.md" "dpmr.Rmd"
[31] "drat.md" "drat.Rmd" "DT.md"
[34] "DT.Rmd" "dtupdate.md" "dtupdate.Rmd"
[37] "emojifont.md" "emojifont.Rmd" "fastGraph.md"
[40] "fastGraph.Rmd" "feather.md" "feather.Rmd"
[43] "flora.md" "flora.Rmd" "foreach.md"
[46] "foreach.Rmd" "foreign.md" "foreign.Rmd"
[49] "formattable.md" "formattable.Rmd" "formula.tools.md"
[52] "formula.tools.Rmd" "gapfill.md" "gapfill.Rmd"
[55] "gdata.md" "gdata.Rmd" "gdtools.md"
[58] "gdtools.Rmd" "geohash.md" "geohash.Rmd"
[61] "geojsonio.md" "geojsonio.Rmd" "git2r.md"
[64] "git2r.Rmd" "githug.md" "githug.Rmd"
[67] "gmailr.md" "gmailr.Rmd" "haven.md"
[70] "haven.Rmd" "Hmisc.md" "Hmisc.Rmd"
[73] "hunspell.md" "hunspell.Rmd" "identifyr.md"
[76] "identifyr.Rmd" "janitoe.md" "janitoe.Rmd"
[79] "jqr.md" "jqr.Rmd" "jsonlite.md"
[82] "jsonlite.Rmd" "kulife.md" "kulife.Rmd"
[85] "lambdaR.md" "lambdaR.Rmd" "latex2exp.md"
[88] "latex2exp.Rmd" "lessR.md" "lessR.Rmd"
[91] "liftr.md" "liftr.Rmd" "lineprof.md"
[94] "lineprof.Rmd" "lintr.md" "lintr.Rmd"
[97] "listenv.md" "listenv.Rmd" "log4r.md"
[100] "log4r.Rmd" "logfile.log" "loggr.md"
[103] "loggr.Rmd" "luzlogr.md" "luzlogr.Rmd"
[106] "magrittr.md" "magrittr.Rmd" "mailR.md"
[109] "mailR.Rmd" "memoise.md" "memoise.Rmd"
[112] "methods.md" "methods.Rmd" "mime.md"
[115] "mime.Rmd" "miniCRAN.md" "miniCRAN.Rmd"
[118] "MissingDataGUI.md" "MissingDataGUI.Rmd" "muRL.md"
[121] "muRL.Rmd" "needs.md" "needs.Rmd"
[124] "Nippon.md" "Nippon.Rmd" "openssl.md"
[127] "openssl.Rmd" "openxlsx.md" "openxlsx.Rmd"
[130] "operator.tools.md" "operator.tools.Rmd" "pacman.md"
[133] "pacman.Rmd" "passwordrandom.md" "passwordrandom.Rmd"
[136] "pdftools.md" "pdftools.Rmd" "pforeach.md"
[139] "pforeach.Rmd" "pipeR.md" "pipeR.Rmd"
[142] "PKI.md" "PKI.Rmd" "plan.md"
[145] "plan.Rmd" "purrr.md" "purrr.Rmd"
[148] "PythonInR.md" "PythonInR.Rmd" "rafalib.md"
[151] "rafalib.Rmd" "random.md" "random.Rmd"
[154] "README.md" "readr.md" "readr.Rmd"
[157] "readxl.md" "readxl.Rmd" "redland.md"
[160] "redland.Rmd" "reinstallr.md" "reinstallr.Rmd"
[163] "remoter.md" "remoter.Rmd" "rex.md"
[166] "rex.Rmd" "Rgitbook.md" "Rgitbook.Rmd"
[169] "rio.md" "rio.Rmd" "RJSONIO.md"
[172] "RJSONIO.Rmd" "rlist.md" "rlist.Rmd"
[175] "rmdformats.md" "rmdformats.Rmd" "rmote.md"
[178] "rmote.Rmd" "rncl.md" "rncl.Rmd"
[181] "RNeXML.md" "RNeXML.Rmd" "rprojroot.Rmd"
[184] "rstack.md" "rstack.Rmd" "rversions.md"
[187] "rversions.Rmd" "SASxport.md" "SASxport.Rmd"
[190] "seer.md" "seer.Rmd" "session.md"
[193] "session.Rmd" "sparklyr.md" "sparklyr.Rmd"
[196] "splitstackshape.md" "splitstackshape.Rmd" "sqldf.md"
[199] "sqldf.Rmd" "statar.md" "statar.Rmd"
[202] "stringi.md" "stringi.Rmd" "stringr.md"
[205] "stringr.Rmd" "tabplot.md" "tabplot.Rmd"
[208] "tabulizer.Rmd" "taxize.md" "taxize.Rmd"
[211] "test.log" "tidyjson.md" "tidyjson.Rmd"
[214] "tidytext.md" "tidytext.Rmd" "tokenizers.md"
[217] "tokenizers.Rmd" "Unicode.md" "Unicode.Rmd"
[220] "unixtools.md" "unixtools.Rmd" "utils.md"
[223] "utils.Rmd" "validate.md" "validate.Rmd"
[226] "verification.md" "verification.Rmd" "versions.md"
[229] "versions.Rmd" "weathermetrics.md" "weathermetrics.Rmd"
[232] "WriteXLS.md" "WriteXLS.Rmd" "XLConnect.md"
[235] "XLConnect.Rmd" "xlsx.md" "xlsx.Rmd"
[238] "ztable.md" "ztable.Rmd"
root_criterion
> is.root_criterion(getwd())
[1] FALSE