[Traminer-users] selecting indiviudals after or before seqdef
hc at parisgeo.cnrs.fr
Fri Jan 13 16:23:58 CET 2012
Ok. Thank you for your help, and yes, I'll register .
----- Mail original -----
De: "Alexis Gabadinho" <Alexis.Gabadinho at unige.ch>
À: "Users questions" <traminer-users at r-forge.wu-wien.ac.at>
Cc: "Hadrien Commenges" <hc at parisgeo.cnrs.fr>
Envoyé: Vendredi 13 Janvier 2012 14:27:55
Objet: Re: [Traminer-users] selecting indiviudals after or before seqdef
You can select rows of sequence object using subscripts. The following example first creates a sequence object for the whole mvad data set and then creates separate sequence objects for males and females using the "male" variable in the mvad data frame.
mvad.seq <- seqdef(mvad, 17:86)
mvad.male.seq <- mvad.seq[mvad$male=="yes",]
mvad.female.seq <- mvad.seq[mvad$male=="no",]
By the way: It appears that you are not registered as a traminer-users list member. It is much easier for us if you register before sending questions to the mailing list. Otherwise we have to manually accept your request.
Le 12. 01. 12 11:18, Hadrien Commenges a écrit :
I've a sample of let's say 10.000 individuals and I want to work on subsamples (subsample of women, of students, etc.) with TraMineR. I'd like to know if it's possible to create a stslist object with seqdef for the whole sample (10.000) and make my selections on this object afterwards (in my workflow this would be more efficient), or do I have to create subsamples before using seqdef function ?
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Traminer-users