Re: [R] Calculate interaction for a big dataframe

2013-07-22 Thread Arnaud Michel
s you directly factor, paste gives you character vector, but it may be convenient too for your purpose. Regards Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of Arnaud Michel Sent: Monday, July 22, 2013 10:57 AM To: R help Subjec

Re: [R] Calculate interaction for a big dataframe

2013-07-22 Thread arun
Hi, You could try:  cumsum(c(1,abs(diff(as.numeric(factor(v1)) # [1] 1 1 1 2 2 3 3 3 3 4 A.K. - Original Message - From: Arnaud Michel To: PIKAL Petr Cc: R help Sent: Monday, July 22, 2013 11:41 AM Subject: Re: [R] Calculate interaction for a big dataframe Thank you Petr paste

Re: [R] Calculate interaction for a big dataframe

2013-07-22 Thread PIKAL Petr
interaction gives you directly factor, paste gives you character vector, but it may be convenient too for your purpose. Regards Petr > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Arnaud Michel > Sent: Monday, J

[R] Calculate interaction for a big dataframe

2013-07-22 Thread Arnaud Michel
Hi To calculate the value of the interaction between factors of a dataframe df, does exist any function which could replace the function when the dataframe df has the numbers of rows of df is large (~55000) and also the numbers of combinaison of the three factors is large. The calcul abort. T