[Traminer-users] subsetting a sequence object

Reynolds, Jeremy E reyno113 at purdue.edu
Wed Jun 14 10:26:54 CEST 2017


Thank you Gilbert.  I will give that a try.

Jeremty

From: traminer-users-bounces at lists.r-forge.r-project.org [mailto:traminer-users-bounces at lists.r-forge.r-project.org] On Behalf Of Gilbert Ritschard
Sent: Monday, June 12, 2017 2:44 AM
To: Users questions <traminer-users at lists.r-forge.r-project.org>
Subject: Re: [Traminer-users] subsetting a sequence object

Hi Jeremy,

Seems that you try to group according to a variable with a single value ("2611"). Did you try to drop the group argument from you seqIplot command?

Best.
gilbert

From: traminer-users-bounces at lists.r-forge.r-project.org<mailto:traminer-users-bounces at lists.r-forge.r-project.org> [mailto:traminer-users-bounces at lists.r-forge.r-project.org] On Behalf Of Reynolds, Jeremy E
Sent: dimanche 28 mai 2017 18:25
To: Users questions <traminer-users at lists.r-forge.r-project.org<mailto:traminer-users at lists.r-forge.r-project.org>>
Subject: [Traminer-users] subsetting a sequence object

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/20170614/3c15f483/attachment.html>


More information about the Traminer-users mailing list