Re: [R] Comparing data frames

2010-04-19 Thread Laura Ferrero-Miliani
972-52-7275845 > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > www.r-statistics.com (English) > -- > > > > > On Sun, Apr 18, 2010 at 7:30 PM, Laura Ferrero-M

[R] Comparing data frames

2010-04-18 Thread Laura Ferrero-Miliani
Dear very helpful friends, It is Sunday, there is no air traffic in Europe, what better to do than try and learn me some more R. I have the following example: owner <- c(1:4) animal <- c("cat", "dog", "cat", "dog") char.1 <- c("fluffy", "playful", "mean", "stupid") food <- c("cat food", "left-ove

Re: [R] loops and if statements

2010-04-18 Thread Laura Ferrero-Miliani
>> d <- cbind(d, c=ifelse(d[,2] == 'meep', 'oops', 'yay')) >> d > a   b  c > [1,] "1" "meep" "oops" > [2,] "2" "foo"  "yay" > [3,] "3" "meep" "oops&q

[R] loops and if statements

2010-04-18 Thread Laura Ferrero-Miliani
Hello, I am very new to R and data analysis in general. I am trying to generate values to append to my data frame using conditional statements. I am playing with this simple example: a <- c(1:4) b <- c("meep", "foo", "meep", "foo") d <- cbind(a, b) now what I want to do is , each time there is a

[R] Fwd: Counting number of values by row (text, not numbers)

2010-04-16 Thread Laura Ferrero-Miliani
Hi everyone! I am very new to R and I am having some difficulties. My data set looks something like this: subjectA                B                C    D               E 1 cat             monkey       cat dog            cat 2 cat

[R] Counting number of values by row (text, not numbers)

2010-04-16 Thread Laura Ferrero-Miliani
Hi everyone! I am very new to R and I am having some difficulties. My data set looks something like this: ABCD E cat monkey cat dogcat cat __ R-help@