Skip to content
Prev 228298 / 398500 Next

Odp: If help

Hi

I would make an interaction of those two vectors.

interaction(sample(letters[1:2], 20, replace=T),sample(letters[1:2], 20, 
replace=T))
 [1] a.a a.b b.b b.a b.b b.b a.a a.a b.b b.a a.a a.a b.b b.a a.a a.b b.a 
a.a b.b
[20] a.b
Levels: a.a b.a a.b b.b

You will get factor and you can change easily labels and change them to 
numeric vector.

See, ?levels, ?factor

Regards
Petr
 

r-help-bounces at r-project.org napsal dne 20.07.2010 19:14:28:
"Reduction"
recode
snippet
Reduction')
change20082009[i,2]=='Reduction')
Reduction')
change20082009[i,2]=='Reduction')
it is
http://www.R-project.org/posting-guide.html