From Gilbert.Ritschard at unige.ch Mon Jun 12 08:44:01 2017 From: Gilbert.Ritschard at unige.ch (Gilbert Ritschard) Date: Mon, 12 Jun 2017 06:44:01 +0000 Subject: [Traminer-users] subsetting a sequence object In-Reply-To: <1683846e620c4fd5813b11e54a433e2e@wppexc08.purdue.lcl> References: <1683846e620c4fd5813b11e54a433e2e@wppexc08.purdue.lcl> Message-ID: <2fa1d13d699542fbbc515409d76ce327@unige.ch> 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] On Behalf Of Reynolds, Jeremy E Sent: dimanche 28 mai 2017 18:25 To: Users questions 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 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 https://www.cla.purdue.edu/sociology/directory/index.aspx?p=Jeremy_Reynolds -------------- next part -------------- An HTML attachment was scrubbed... URL: From reyno113 at purdue.edu Wed Jun 14 10:26:54 2017 From: reyno113 at purdue.edu (Reynolds, Jeremy E) Date: Wed, 14 Jun 2017 08:26:54 +0000 Subject: [Traminer-users] subsetting a sequence object In-Reply-To: <2fa1d13d699542fbbc515409d76ce327@unige.ch> References: <1683846e620c4fd5813b11e54a433e2e@wppexc08.purdue.lcl> <2fa1d13d699542fbbc515409d76ce327@unige.ch> Message-ID: <074777d286094ac7a39e076941dc0ff3@wppexc08.purdue.lcl> 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 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] On Behalf Of Reynolds, Jeremy E Sent: dimanche 28 mai 2017 18:25 To: Users questions > 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 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 https://www.cla.purdue.edu/sociology/directory/index.aspx?p=Jeremy_Reynolds -------------- next part -------------- An HTML attachment was scrubbed... URL: