Hello all,
I want to write five different files using a loop in r. My current code is as follows:
write.table(CAR1_final, file = "C:/Users/khalili/Desktop/Newfolder3/CAR1.txt", sep = "",quote = FALSE,row.names = FALSE, col.names = FALSE)
write.table(CAR2_final, file = "C:/Users/khalili/Desktop/Newfolder3/CAR2.txt", sep = "",quote = FALSE,row.names = FALSE, col.names = FALSE)
write.table(CAR3_final, file = "C:/Users/khalili/Desktop/Newfolder3/CAR3.txt", sep = "",quote = FALSE,row.names = FALSE, col.names = FALSE)
write.table(CAR4A_final, file = "C:/Users/khalili/Desktop/Newfolder3/CAR4A.txt", sep = "",quote = FALSE,row.names = FALSE, col.names = FALSE)
write.table(CAR5_final, file = "C:/Users/khalili/Desktop/Newfolder3/CAR5.txt" , sep = "",quote = FALSE,row.names = FALSE, col.names = FALSE)
How can I skip repetition using a loop?
Thanks,