I created a function that joint specific column from 3 different data.frame(Ini, Aug_64, Dim_2). I want to repeat this operation 1259 times. I don’t know how to create this automatically. I found in some of my research that I should use replicate but I don’t know how to construct the code, because I want the value of Q to change each time.I was also wondering if there was a way to save the data.frame created a swell automatically at the same time.
All my data.frame are 83 rows by 1259 columns.
Here is the function I created.
tr4<-function(Q){
left_join(select(Ini, c("ID",Q)), select(Aug_64, c("ID",Q)), by="ID") %>%
left_join(., select(Dim_2, c("ID",Q)), by="ID") }
write.csv(data.frame(tr4(53)), "/Users/T/Desktop/Rstudio/53", row.names = T)