Dear R community,

I am new to R—did some online tutorials and exercises in R playground. I was 
wondering if I could seek guidance on the following matter.

I have a set of 403 .csv files. Each.csv file contains the same layouts and 
distinguished by subject ID and date in the file name. The dataset looks like 
this:

Sub1-20170305.csv
Sub2-20180214.csv
…
Sub403-20191109.csv

I will use rbind function to combine 403 csv files in a single file (myFile). I 
will create two new variables (use mutate function) in myFile (subject ID and 
date). Is there a way to subtract subject ID (shown as “Sub1, 2,,,403”) and 
date from the name of the csv file and then place them in “subject ID” and 
“date” in myFile?

Any info on the issue itself or where to look for will be appreciated.

Thanks,

CJ






        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to