Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- X2 = col_number()))
- folder <- setwd("C:\\Users\\sonia\\OneDrive\\BioBeats\\resilience and stress\\Resilience and stress study\\data\\RR")
- for (f in folder) {
- f <- read_table2(files, col_names = FALSE, col_types = cols(X1 = col_number(),
- X2 = col_number()))
- subj_id <- lapply(str_split(f, '_'),
- function(x) {str_split(x[1], '-')[[1]][2]})
- #fino a qui funziona ma gli devo dire di prendere tutti i file
- }
- for (f in files) {
- Df <- as.data.frame(f)
- }
- for (i in subj_id) {
- new_df <- mutate(Df, participant_id = subj_id[i])
- print(new_df)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement