Re: [R] seqinr ?: Splitting a factor name into several columns. Dealing with metabarcoding data.

2014-10-19 Thread Jeff Newmiller
On Sat, 18 Oct 2014, Anna Zakrisson Braeunlich wrote: Thank you! That was a easy and fast solution! If it was so easy, why couldn't you adapt Ista's solution? I suspect it is because you don't understand his suggestion. May I post a follow-up question? (I am not sure if this would rather

Re: [R] seqinr ?: Splitting a factor name into several columns. Dealing with metabarcoding data.

2014-10-19 Thread Anna Zakrisson Braeunlich
Hi Jeff an many thank's for your time. I meant that it was easy as in not requiring som many steps... I have managed to get it to run and it has solved my problem perfectly. Thank you for all your tips and instructions! Up until now, I have used excel for all problems similar to this one and

Re: [R] seqinr ?: Splitting a factor name into several columns. Dealing with metabarcoding data.

2014-10-18 Thread Anna Zakrisson Braeunlich
Thank you! That was a easy and fast solution! May I post a follow-up question? (I am not sure if this would rather should be posted as a new question, but I post it here and then I can re-post it if this is the wrong place to ask this). I am ever so grateful for your help! /Anna

Re: [R] seqinr ?: Splitting a factor name into several columns. Dealing with metabarcoding data.

2014-10-13 Thread Ista Zahn
Hi Anna, On Sun, Oct 12, 2014 at 3:24 AM, Anna Zakrisson Braeunlich anna.zakris...@su.se wrote: Hi, I have a question how to split a factor name into different columns. I have metabarcoding data and need to merge the FASTA-file with the taxonomy- and counttable files (dataframes). To be

Re: [R] seqinr ?: Splitting a factor name into several columns. Dealing with metabarcoding data.

2014-10-13 Thread David.Kaethner
I'm not sure I understood your problem, maybe like this: # split identifiers into columns df1 - data.frame(cbind(X = 1:10, Y = rnorm(10)), Z.identifierA.B1298712 = factor(rep(LETTERS[1:2], each = 5))) id - names(df1)[3] x - do.call(rbind, str_split(id, \\.)) y - sapply(x,