[Traminer-users] selecting indiviudals after or before seqdef

Hadrien Commenges hc at parisgeo.cnrs.fr
Fri Jan 13 16:23:58 CET 2012


Ok. Thank you for your help, and yes, I'll register . 
Regards, 
Hadrien 

----- 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 

Dear Hadrien, 

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. 

library(TraMineR) 
data(mvad) 
mvad.seq <- seqdef(mvad, 17:86) 

mvad.male.seq <- mvad.seq[mvad$male=="yes",] 
summary(mvad.male.seq) 

mvad.female.seq <- mvad.seq[mvad$male=="no",] 
summary(mvad.female.seq) 

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. 

Best regards, 
Alexis 


Le 12. 01. 12 11:18, Hadrien Commenges a écrit : 


Hi, 

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 ? 

Thanks, 

Hadrien 
_______________________________________________
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...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20120113/8117f400/attachment.htm>


More information about the Traminer-users mailing list