[R] selecting only specific rows in R

Adrienne Keller adrienne.keller at umontana.edu
Sat Jun 5 17:00:22 CEST 2010

Hi, I have a data frame with columns as follows: tree species  
(independent variable) and several dependent variables (e.g. carbon,  
nitrogen, phosphorus). Each row represents one tree sample. Some tree  
samples are unique species in the data frame while other species were  
replicated (i.e. rows 1,2,3 may be identical for the "tree species"  
column but have different values for the other dependent variable  
columns). I want to create a new data frame that selects only the tree  
species that have replicates. In other words, I want to select all  
rows that have at least one replicate in the column "tree species".

Ideas on how to write such a function?


Adrienne Keller

More information about the R-help mailing list