[datatable-help] Boxplot of mean, sd, max, min without raw data

affableambler nfields at gmail.com
Thu Apr 13 23:19:04 CEST 2017


Sorry for not getting back to you sooner. In that case, you can use par()
before the loop to combine multiple plots into one view:

data<-read.table('E:\\Libraries\\Documents\\WCM4.txt',sep='\t',header=T,stringsAsFactors
= F) 

#Remove column of row numbers 
data$x<-NULL 

#Run a for loop to create separate boxplots for the data in each row: 
par(mfrow=c(1,nrow(data)))
for(row in
1:nrow(data)){boxplot(as.numeric(as.vector(data[row,])),main=row)} 


The mfrow parameter takes a vector of two integers.  The first is the number
of rows in the view and the second is the number of columns, so the code
above gives you one row with fourteen plots.  If you want to divide it into
two rows, just change it to c(2,nrow(data)/2), etc.





--
View this message in context: http://r.789695.n4.nabble.com/Boxplot-of-mean-sd-max-min-without-raw-data-tp4730939p4732123.html
Sent from the datatable-help mailing list archive at Nabble.com.


More information about the datatable-help mailing list