[Traminer-users] subsetting a sequence object
Reynolds, Jeremy E
reyno113 at purdue.edu
Sun May 28 18:25:25 CEST 2017
Dear Traminer Users,
I am trying to create a sequence index plot for a subset of the cases in a sequence object. I followed the example at the link below, but I get an error message about missing values. I can try to make an example with the mvad data if needed, but I am hoping the output below might be enough for someone to give me a tip.
Thanks,
Jeremy
https://stackoverflow.com/questions/13922750/how-to-create-sequence-index-plots-of-a-subset-of-groups-in-a-sequence-object
txt> subset <- bhps.m$lcs6c_m %in% c("2611")
txt> table(subset)
subset
FALSE TRUE
61031 23119
txt>library(summarytools)
txt> freq(men.match$lcs6c_m)
Frequencies
Dataframe name: men.match
Variable name: lcs6c_m
N %Valid %Cum.Valid %Total %Cum.Total
----------- ----- -------- ------------ -------- ------------
1024 0 0 0 0 0
2296 0 0 0 0 0
2611 23119 100 100 100 100
2849 0 0 100 0 100
3876 0 0 100 0 100
5479 0 0 100 0 100
<NA> 0 NA NA 0 100
Total 23119 100 100 100 100
txt> seqIplot(seq.m[subset, ], group=bhps.m$lcs6c_m[subset])
Error in if (any(x == nr)) { : missing value where TRUE/FALSE needed
____________________________________
Dr. Jeremy Reynolds
Professor
309 Stone Hall
Department of Sociology
700 W. State Street
Purdue University
West Lafayette, IN 47907
Phone: (765) 496-3348<tel:%28765%29%20496-3348> https://www.cla.purdue.edu/sociology/directory/index.aspx?p=Jeremy_Reynolds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20170528/c7a63849/attachment.html>
More information about the Traminer-users
mailing list