search for: splitfctr

Displaying 1 result from an estimated 1 matches for "splitfctr".

Did you mean: split_str
2008 Feb 07
1
How to split a factor (unique identifier) into several others?
...e separate factor columns "sample", "condition" and "place". This is what I did so far: # generate a factor column for the example fctr<- factor(c("sample1_condition1_place1", "sample2_condition1_place1", "sample3_condition1_place1")) splitfctr <- strsplit(as.character(fctr),"_") > splitfctr [[1]] [1] "sample1" "condition1" "place1" [[2]] [1] "sample2" "condition1" "place1" [[3]] [1] "sample3" "condition1" "place1" Now t...