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
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
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
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
4 matches
Mail list logo