0

I'd like to create a folder containing empty folders that correspond to values of the ID column of my dataset. There are over 1000 rows in the column.

Here is an example:

IDs People
124 Jim
345 Mary
675 Hilary
897 Chris
235 John.

I want the name of the folders to be 124, 345, 675, etc. I would like to find an answer similar to the one that was given here for creating empty text files.

bear_525
  • 41
  • 5
  • 3
    `sapply(your_data$IDs, dir.create)` – Gregor Thomas Aug 01 '23 at 15:41
  • @GregorThomas Thank you. `dir.create()` is not working for me. I'm getting the following error: "Error in match.fun(FUN) : 'dir.create(file.path(mainDir, subDir))' is not a function, character or symbol" – bear_525 Aug 14 '23 at 05:27
  • I found my answer here [https://stackoverflow.com/questions/65179027/create-folders-and-subfolders-based-on-two-variables] – bear_525 Aug 14 '23 at 06:46

0 Answers0