This code works:
subset(NativeDominant.df,!ID=="37-R17")
This code does not:
Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
how do i get subset() to work on a range of values?
--
View this message in context:
http://n4.nabble.com/subset-for-multiple-values-tp1560543p1560543.html
Sent from the R help mailing list archive at Nabble.com.
Use ' %in%':
Tree.df<-subset(NativeDominant.df,!ID %in%
c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
On Thu, Feb 18, 2010 at 3:59 PM, chipmaney <chipmaney at hotmail.com>
wrote:>
> This code works:
>
> subset(NativeDominant.df,!ID=="37-R17")
>
>
> This code does not:
>
>
Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
>
>
>
> how do i get subset() to work on a range of values?
> --
> View this message in context:
http://n4.nabble.com/subset-for-multiple-values-tp1560543p1560543.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Henrique Dallazuanna
Curitiba-Paran?-Brasil
25? 25' 40" S 49? 16' 22" O
subset(df, x %in% c(...)) chipmaney wrote:> This code works: > > subset(NativeDominant.df,!ID=="37-R17") > > > This code does not: > > Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16")) > > > > how do i get subset() to work on a range of values?
Apparently Analagous Threads
- [PATCH 0/4] ia64/xen: paravirtualization of hand written assembly code
- [PATCH 0/4] ia64/xen: paravirtualization of hand written assembly code
- [PATCH 0/8] RFC: ia64/xen TAKE 2: paravirtualization of hand written assembly code
- [PATCH 0/8] RFC: ia64/xen TAKE 2: paravirtualization of hand written assembly code
- [PATCH 00/15] ia64/pv_ops take 5