I know I can create an array in R like this:
vec <- c(a=1,b=2,c=3)
vec["b"]
#b
#2
what I have is a list like this:
> traits
[1] STD V1 V2 V3 W1 W2 W3
Levels: STD V1 V2 V3 W1 W2 W3
what i want ot to create and associative array
AA<- c(STD=0,V1=0,V2=0,V3=0,W1=0,W2=0,W3=0)
then latter on I can update the array AA("STD")=1 or whatever