search for: testseq_df

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

2009 Dec 30
1
Factor and Level Issue
Dear useR's I have a small basic problem which I am hoping to get some help with. I have a data frame, testSeq_df, with 1 row and 500 columns. Each column is a character (a,c,g or t). I want this sequence to have 4 factors (a,c,g,t). When I try the following: for(i in 1:500){ if (length(levels(testSeq_df[,i]))==1) levels(testSeq_df[,i]) <- c(a="a",g="g",c="c",t="t...