ggplot2 : printing multiple plots in one page with a loop
问题 I have several subjects for which I need to generate a plot, as I have many subjects I'd like to have several plots in one page rather than one figure for subject. Here it is what I have done so far: Read txt file with subjects name subjs <- scan ("ListSubjs.txt", what = "") Create a list to hold plot objects pltList <- list() for(s in 1:length(subjs)) { setwd(file.path("C:/Users/", subjs[[s]])) #load subj directory ifile=paste("Co","data.txt",sep="",collapse=NULL) #Read subj file dat = read