Hello
I have a .csv file with 37 rows and three columns. I am trying to figure out, if it is possible, to write some sort loop that would enable me to select and save out each row individually with file names that would be referenced in one of the columns.
I know how to do it individually, but I hope that I can make this process more efficient with a coding solution instead of having to go one-by-one.
Here is a general example of my data.
accessname <- ("trail1", "trail2", "trail3")
trailtype <- ("mountain", "flat", "hilly")
parking <- ("no", "yes", "no")
trails <- data.frame(accessname, trailtype, parking)
I would like to select each row, and save it out as the name that appears under the "accessname" column i.e., trail1.csv
Thanks for looking