Sorry that last bit of code was redundant, it should be:
x2 <- ifelse(x1=="social and cultural specialists", "1", "0")
ifelse() leaves NAs by default so no need to manually do it.
On Thu, May 27, 2010 at 7:30 AM, Joshua Wiley wrote:
> Dear Simon,
>
> It is a bit hard to tell what you want witho
Dear Simon,
It is a bit hard to tell what you want without a reproducible example,
below is my guess. I created x1 as a factor with some data in it
based off of what I think you are working with and then x2 from x1.
data <- c("social and cultural specialists", "l
Hi,
I'm really confused about your question. For many reasons:
- because I'm a beginner myself?
- what are you trying to do with x1? You define the levels of x1, but
you don't give any values to it. Which could (also) explain why your
code does not work
- your if...else statement is weird for m
3 matches
Mail list logo