Skip to content
Prev 177017 / 398528 Next

subset dataframe by rows using character vector?

Is this what you want?

plotNames <- c("plot1", "plot2", "plot3")     # plot is probably best  
left as the name of the base function
full.data[full.data$PLOTID %in% plotNames, ] # note the comma


HTH,

baptiste
On 14 Apr 2009, at 15:20, zack holden wrote:

            
_____________________________

Baptiste Augui?

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag