Displaying 2 results from an estimated 2 matches for "w738".
Did you mean:
1738
2008 Jun 06
1
editing a data.frame
dear R users,
the data frame (read in from a csv) looks like this:
TreeTag Census Stage DBH
1 CW-W740 2001 juvenile 5.8
2 CW-W739 2001 juvenile 4.3
3 CW-W738 2001 juvenile 4.7
4 CW-W737 2001 juvenile 5.4
5 CW-W736 2001 juvenile 7.4
6 CW-W735 2001 juvenile 5.4
...
1501 1.00E-20 2001 adult 32.5
i would like to change values under the TreeTag column. as the last
value shows, some of the tags have decimals follo...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame.
For instance
> ddTable <-
data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry"))
I want a dataset that is
Id Name
1 Paul
2 Bob
> unique(ddTable)
Will give me all 4 rows, and
> unique(ddTable$Id)
Will give me c(1,2), but not accompanied by the name column.