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
>-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
>-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.
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
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
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
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