This plays well with knitr/rmarkdown’s default behavior around working directory and in package development/checking workflows.Ībout more features, such as additional ways to mark the top directory and In fact, it will even work if R’s working directory is anywhere inside the project, i.e. it will work from sub-folders. This will run, with no edits, for anyone who follows the convention about launching R in the project folder. Ggsave(here("figs", "foofy_scatterplot.png")) Now the code looks like so: library(ggplot2)ĭf <- lim(here("data", "raw_foofy_data.csv")) To continue our example, start R in the foofy directory, wherever that may be. If you launch R from the shell, cd to the correct folder first.
0 Comments
Leave a Reply. |