[Traminer-users] Problème conservation identifiant SPELL to STS

Mattias Hellgren mattias.hellgren at liu.se
Thu May 2 08:19:49 CEST 2013


Hello!

Sorry for giving the answer in English, I sadly do not speak French. I used a machine translation to understand the question and use the same for a bad translation into French.

The ID numbers can be found in the row names:  

row.names(trajmig) 

Hope this helps!

Google translate of the above:

Désolé pour donner la réponse en anglais, je ne parle malheureusement pas français. J'ai utilisé une machine de traduction pour comprendre la question.

Les numéros d'identification peuvent être trouvés dans les noms de lignes:

row.names(trajmig)

Espérons que cela aide!

Mattias Hellgren



-----Ursprungligt meddelande-----
Från: traminer-users-bounces at lists.r-forge.r-project.org [mailto:traminer-users-bounces at lists.r-forge.r-project.org] För Anton Perdoncin
Skickat: den 29 april 2013 16:13
Till: traminer-users at lists.r-forge.r-project.org
Ämne: [Traminer-users] Problème conservation identifiant SPELL to STS

Bonjour,
Je cherche à convertir un jeu de données en format SPELL en jeu de données en format STS. Problème : la colonne IDENT du premier jeu de données disparaît à l'issue de la manip. Ce qui est bien embêtant pour pouvoir ensuite fusionner le jeu STS avec le reste des infos sur mes individus...

Voici le code :

trajmig.sts <- seqformat(trajmig, id="IDENT", begin="M_ANDEB", end="M_ANFIN", status="Regionmig2",  from="SPELL", to="STS", process=FALSE)

 > str(trajmig)
'data.frame':    37881 obs. of  10 variables:
  $ M_NLIG    : int  1 1 1 2 1 2 1 1 1 2 ...
  $ M_ANDEB   : int  1989 1985 1969 1999 1959 1973 1990 1960 1982 2001 ...
  $ M_ANFIN   : int  2008 2008 1999 2008 1973 2009 2008 2008 2001 2008 ...
  $ M_AGDEB   : int  0 0 0 30 0 14 0 0 0 19 ...
  $ M_AGFIN   : int  19 23 30 39 14 50 18 48 19 26 ...
  $ M_Gautre  : int  NA NA NA 2 NA 2 NA NA NA 2 ...
  $ Poidsi    : num  384 125 109 109 540 ...
  $ IDENT     : int  1 2 3 3 4 4 5 6 7 7 ...
  $ Regionmig2: int  1101 1101 3401 1101 2201 1101 1101 1101 3401 1101 ...
  $ IDENT2    : int  1 2 3 3 4 4 5 6 7 7 ...

 > str(trajmig.sts)
'data.frame':    21761 obs. of  62 variables:
  $ y1948: int  NA NA NA NA NA NA NA NA NA NA ...
  $ y1949: int  NA NA NA NA NA NA NA NA NA NA ...
  $ y1950: int  NA NA NA NA NA NA NA NA NA NA ...
  $ y1951: int  NA NA NA NA NA NA NA NA NA NA ...
etc...

La manip se déroule bien, à part cela. Y a-t-il une option à ajouter pour conserver l'identifiant ?

Merci !

Anton Perdoncin
_______________________________________________
Traminer-users mailing list
Traminer-users at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/traminer-users


More information about the Traminer-users mailing list