[R] accessing the ellements in an array and factors.

Bogdan Tanasa tanasa at gmail.com
Fri Jun 12 05:40:03 CEST 2015


Dear all,

please could you please with a simple question : I do have an array of 32
elements, where each element is indexed by a name : eg :

list_triplet_wells <-c("A1:A2:A3", "A4:A5:A6 ",  "A7:A8:A9",   "A10:A11:A12
")
xxx <-array(0, dim=4)
dimnames(xxx) = list(list_triplet_wells)

>From another script, I have an output like :

> yyy
[1]   A1:A2:A3    B4:B5:B6
31 Levels:   B4:B5:B6    A1:A2:A3  ...   F4:F5:F6

so yyy seems to be a factor type. I would need to call the elements of xxx
array based on the elements of yyy; eg xxx[yyy].

How can I do this in order to circumvent the factor type of yyy ? Thanks a
lot,

bogdan

	[[alternative HTML version deleted]]



More information about the R-help mailing list