[R] Failure to subset in R v 2.8.0
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Tue Dec 2 01:15:30 CET 2008
Alan Cohen wrote:
> Hello,
>
> I've been using a pre-release version of R v 2.8.0 for Windows for the last couple months. I think that there have been consistent problems with subsetting data sets, but I had usually been able to find work-arounds or was unable to confirm this as a bug. I think now I have, and would love advice on what to do if I've made some error.
>
> The data set in question ("c") has 500,000 observations and 44 variables. The problematic variable, "month," takes integer values 1:12, and all are present in the data set:
>
>> unique(c$month)
> [1] 11 10 9 8 12 1 7 4 6 2 5 3
>
> However, I can't select observations of c for certain values of month:
...
>> length(c$month[c$month==11])
> [1] 0
Hmm.
Does any of these make us any wiser?
mode(c$month)
any(c$month==11)
table(c$month)
dput(unique(c$month))
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list