From mattias.hellgren at liu.se Thu May 2 08:19:49 2013 From: mattias.hellgren at liu.se (Mattias Hellgren) Date: Thu, 2 May 2013 06:19:49 +0000 Subject: [Traminer-users] =?iso-8859-1?q?Probl=E8me_conservation_identifia?= =?iso-8859-1?q?nt_SPELL_to_STS?= In-Reply-To: <517E7FF2.9080703@gmail.com> References: <517E7FF2.9080703@gmail.com> Message-ID: <4C1BF6F451A8F845B6E6A63F0A3C1BB5162671E6@MB1-2010.ad.liu.se> 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 From elie.chosson at upmf-grenoble.fr Thu May 2 09:54:04 2013 From: elie.chosson at upmf-grenoble.fr (ELIE CHOSSON) Date: Thu, 2 May 2013 09:54:04 +0200 (CEST) Subject: [Traminer-users] Problems for sequences search that contain a specific state and with the seqecreate/seqecontain functions. In-Reply-To: <1775363722.91234.1364899160731.JavaMail.root@upmf-grenoble.fr> Message-ID: <2019854811.2122591.1367481244860.JavaMail.root@upmf-grenoble.fr> Hello dear TraMineR's users. I have some basic questions, on the TraMineR package. Unfortunately, i don't find some response elements. That is my problem: i create my seqdef object, and i create a state for the gaps NA's, named "gap": > Dddd.seq<-seqdef(Dddd, 1:12, left="late", right="out", gaps="gap", nr="no") And, in a second time, i would like to work precisely on sequences which contain this specific state '("gap"), i.e. sequences with an interruption. How i can do that? I try to use the seqecontain function. But: 1 - I don't know what is a "seqelist" object, and if we have to use seqecreate function before using the seqecontain function. In other words, my question is: can we -and how- searching sequences that contain a specific state directly in the seqdef object? 2 - For do this I try to use seqecreate function before, but R return this message: Erreur dans `seqelength<-`(`*tmp*`, value = c(12, 12, 12, 12, 12, 12, 12, : s and len should be of the same size . I supposed than the error come from NA's in my original data set, but in my seqdef function I define state's label for all the eventualities (left, gap, right and nr). Anyway, i'v this info for my seqdef object: [>] min/max sequence length: 12/12 So all my sequences have the same lenght. What's mean this error message? What are "s" and "len"? I thank you for TraMineR package, and for the help, And i hope than my english is not to bad! Elie Chosson, Doctorant contractuel, BATEG, Bureau 513, tel: 04 76 82 59 89 Centre de Recherche en ?conomie de Grenoble (CREG) BP 47 - 38040 Grenoble Cedex 9 -------------- next part -------------- An HTML attachment was scrubbed... URL: