[R] unique/subset problem
helprhelp at gmail.com
Thu Jan 25 19:30:26 CET 2007
Even you removed "many" genomes1 by setting score< -5; it is not
necessary saying you changed the uniqueness.
To check this, you can do like
p0 <- unique(dataset[dataset$score< -5, "genome1"]) # same as subset
p1 <- unique(dataset[dataset$score>= -5, "genome1"])
if the output above has NULL, then it means even though you remove
many genomes1, but it does not help changing the uniqueness.
On 1/25/07, lalitha viswanath <lalithaviswanath at yahoo.com> wrote:
> I am new to R programming and am using subset to
> extract part of a data as follows
> names(dataset) =
> prunedrelatives <- subset(dataset, score < -5);
> However when I use unique to find the number of unique
> genomes now present in prunedrelatives I get results
> identical to calling unique(dataset$genome1) although
> subset has eliminated many genomes and records.
> I would greatly appreciate your input about using
> "unique" correctly in this regard.
> TV dinner still cooling?
> Check out "Tonight's Picks" on Yahoo! TV.
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Weiwei Shi, Ph.D
"Did you always know?"
"No, I did not. But I believed..."
More information about the R-help