Re: [R] Automating Plot Commands using a Loop

2009-11-11 Thread Koraelus
Hello, Thank you for responding! The data is in the same format as the example I showed earlier. The data is different from matrix to matrix, but the general format is: Time1Time 2 Time3 Time4 Species1 134 5 Species2 34

Re: [R] Automating Plot Commands using a Loop

2009-11-10 Thread jim holtman
Why did you transpose the dataframe (TData <- t(Data))? Is your data in the same structure as is expected. Provide either the data file you are plotting, or at least an 'str' of the object. On Tue, Nov 10, 2009 at 3:06 PM, Koraelus wrote: > > Hello, > > Thank you very much. Your string makes pe

Re: [R] Automating Plot Commands using a Loop

2009-11-10 Thread Koraelus
Hello, Thank you very much. Your string makes perfect sense to me, but I get an error when I try this: Data<-read.csv("Datacull.txt",header=T,row.names=1) TData<-t(Data) PlotFunction<-function (x) { par(mfrow=c(3,6)) for (i in colnames(x)) { plot(x[[i]],type="o",axes=F,xlab='',ylab='',ylim=c(0,2

Re: [R] Automating Plot Commands using a Loop

2009-11-09 Thread jim holtman
try this: Data <- read.table(textConnection(" Alpha Beta Gamma Delta A .1 .2 .3.4 B .2.3 .4.5 C .8 .9 .43 .13 D .13 .34 .34 .3"), header=TRUE) closeAllConnections() par(mfrow=c(2,2)) for (i in colnames(Data)){ plot(Data[[i]],