[R] how to sort dataframe levels

2007-07-31 Thread Emilio Gagliardi
Hi everyone, I've been bashing my head against this for days now, and can't figure out what to do. I have the following dataframe headerappetitive stimulusaversive stimuluschaining contingencydiscriminative stimulusextinctionintermittent reinforcementnegative reinforce

Re: [R] how to sort dataframe levels

2007-08-01 Thread Johnson, Andrea
Emilio- One possible way to do this is to create a new factor and put the levels in the order you want them in. For example: related.differences$header2 <- factor(related.differences$header, levels=c("spontaneous recovery", "negative reinforcer", ... etc. ) where you want spontaneous recovery