Skip to content

Creating directories in R#2

Open
gadenbuie wants to merge 2 commits into
moldach:masterfrom
gadenbuie:r-create-dirs
Open

Creating directories in R#2
gadenbuie wants to merge 2 commits into
moldach:masterfrom
gadenbuie:r-create-dirs

Conversation

@gadenbuie

Copy link
Copy Markdown

Two small changes to the code to create directories in R.

  1. I modified the setting of the folder names to use here() for all folders. This makes sure that you get the benefits of here() for the base level folder and not just for data/raw and data/tidy.

  2. I replaced purrr::map() with purrr::walk() whose purpose is to apply functions that have side-effects, such as dir.create().

They are in separate commits so that you can easily revert either commit if you would like only one of the changes.

dir.create() is a function with side-effects (creating directories)
so the preferred purrr function is walk()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant