Skip to content
Prev 274849 / 398506 Next

using a dictionary in R

On Wed, Oct 19, 2011 at 11:06:21AM +0200, Eran Eidinger wrote:
You can do that with named elements of a vector:
Hi   Why water 
    1     5     4
Why 
  5
Hi   Why water 
    1     8     4
I guess this is along the lines you have in mind:
Var1 Var2 a b
1    a    a 1 1
2    b    a 8 1
3    a    b 1 8
4    b    b 8 8
Var1 Var2 a b prod
1    a    a 1 1    1
2    b    a 8 1    8
3    a    b 1 8    8
4    b    b 8 8   64
I'm not sure what exactly you want here...

cu
	Philipp