Re: [R] length() misbehaving?

2003-03-14 Thread Thomas Lumley
On Fri, 14 Mar 2003, David Parkhurst wrote: > I'm having a weird problem with length(), in R1.6.1 under windows2000. I have a > dataframe called byyr, with ten columns, the first of which is named cnd95. > summary(byyr) shows that byyr$cnd95 contains the factor level "tr" 66 times. Also, > when

RE: [R] length() misbehaving?

2003-03-14 Thread Marc Schwartz
>-Original Message- >From: Marc Schwartz [mailto:[EMAIL PROTECTED] >Sent: Friday, March 14, 2003 10:23 AM >To: 'David Parkhurst'; '[EMAIL PROTECTED]' >Subject: RE: [R] length() misbehaving? > > >>-Original Message- >>From: [EMAI

RE: [R] length() misbehaving?

2003-03-14 Thread Marc Schwartz
>-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of David Parkhurst >Sent: Friday, March 14, 2003 9:35 AM >To: [EMAIL PROTECTED] >Subject: [R] length() misbehaving? > > >I'm having a weird problem with length(), in R1.6.

Re: [R] length() misbehaving?

2003-03-14 Thread Ott Toomet
HI Dave, | From: "David Parkhurst" <[EMAIL PROTECTED]> | Date: Fri, 14 Mar 2003 10:35:19 -0500 | | I'm having a weird problem with length(), in R1.6.1 under windows2000. I have a | dataframe called byyr, with ten columns, the first of which is named cnd95. | summary(byyr) shows that byyr$c

Re: [R] length() misbehaving?

2003-03-14 Thread Uwe Ligges
David Parkhurst wrote: I'm having a weird problem with length(), in R1.6.1 under windows2000. I have a dataframe called byyr, with ten columns, the first of which is named cnd95. summary(byyr) shows that byyr$cnd95 contains the factor level "tr" 66 times. Also, when I enter byyr$cnd95 at the comm

Re: musues of == (was [R] length() misbehaving?)

2003-03-14 Thread ripley
It's the users who are misbehaving -- it usually is! I think you mean [byyr$cnd95 %in% "tr"], not the same thing as R has NA character strings. > x <- c("a", "a", NA, "b2") > x == "a" [1] TRUE TRUENA FALSE > x[x == "a"] [1] "a" "a" NA > x[x %in% "a"] [1] "a" "a" MASS4 page 30 discusses th

[R] length() misbehaving?

2003-03-14 Thread David Parkhurst
I'm having a weird problem with length(), in R1.6.1 under windows2000. I have a dataframe called byyr, with ten columns, the first of which is named cnd95. summary(byyr) shows that byyr$cnd95 contains the factor level "tr" 66 times. Also, when I enter byyr$cnd95 at the command line, I can count 6