search for: df2new

Displaying 4 results from an estimated 4 matches for "df2new".

Did you mean: d2new
2013 Sep 22
2
Coding several dummy variables into a single categorical variable
Colleagues, I have generated several dummy variables: n$native0 <- 1 * (n$re=="white" & n$usborn=="yes") n$native1 <- 1 * (n$re=="afam" & n$usborn=="yes") n$native2 <- 1 * (n$re=="carib" & n$usborn=="yes") n$native3 <- 1 * (n$re=="carib" & n$usborn=="no") I would now like to combine these
2013 Jul 24
3
Change values in a dateframe
Hello I have the following problem : The dataframe TEST has multiple lines for a same person because : there are differents values of Nom or differents values of Prenom but the values of Matricule or Sexe or Date.de.naissance are the same. TEST <- structure(list(Matricule = c(66L, 67L, 67L, 68L, 89L, 90L, 90L, 91L, 108L, 108L, 108L), Nom = structure(c(1L, 2L, 2L, 4L, 8L, 5L, 6L, 9L, 3L, 3L,
2013 Jun 11
1
mapply on multiple data frames
Hi all- I am wondering about using the mapply function to multiple data frames. Specifically, I would like to do a t-test on a subset of multiple data frames. All data frames have the same structure. Here is my code so far: f<-function(x,y) { test<-t.test(x$col1[x$col3=="num",],v$col2[x$col3=="num",],paired=T,alternative="greater") out<-test$p.value
2013 Jul 12
4
simplify a dataframe
Hello I have the following problem : group the lines of a dataframe when no information change (Matricule, Nom, Sexe, DateNaissance, Contrat, Pays) and when the value of Debut of lines i = value Fin of lines i-1 I can obtain it with a do loop. Is it possible to avoid the loop ? The dataframe initial is df1 dput(df1) structure(list(Matricule = c(1L, 1L, 1L, 6L, 6L, 6L, 6L, 6L, 6L, 8L, 8L, 8L,