<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000'>Hi,<br><br>I've created a sts object with the seqdef function and I'd like to split this object by a factor (cluster). I canuse some functions with the "group=" option, but I need to work with smaller objects and I really want to split the big sts object into several ones. When I split this object I get an error and I can't compute or plot anything with the splitted object.<br><br>Here is the summary of the big sts object:<br><br><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Monospace; font-size: 13px; line-height: 17px; text-align: -webkit-left; white-space: pre-wrap; "><pre tabindex="0" class="GD40030CLR" style="font-family: Monospace; font-size: 10pt !important; outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 1.3; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Monospace; font-size: 13px; line-height: 17px; text-align: -webkit-left; white-space: pre-wrap; "><pre tabindex="0" class="GD40030CLR" style="font-family: Monospace; font-size: 10pt !important; outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 1.3; "><span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">> </span><span class="GD40030CCR ace_keyword" style="color: blue; ">summary(stsNWObject)
</span> [>] sequence object created with TraMineR version 1.8-1 
 [>] 22064 sequences in the data set, 19745 unique 
 [>] min/max sequence length: 288/288
 [>] alphabet (state labels):  
     1=Hout (Home outside)
     2=Ad (Adjacent)
     3=Ne (Near)
     4=Fa (Far)
     5=Hoho (Home home)
     6=Tr (Trip)
 [>] dimensionality of the sequence space: 1440 
 [>] colors: 1=#A1D99B 2=#41AB5D 3=#006D2C 4=#00441B 5=#E5F5E0 6=#000000 
 [>] symbol for missing state: * </pre></span></span><br><br>And here is how I create the splitted object and the error I get:<br><br></pre></span></span><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Monospace; font-size: 13px; line-height: 17px; text-align: -webkit-left; white-space: pre-wrap; "><pre tabindex="0" class="GD40030CLR" style="font-family: Monospace; font-size: 10pt !important; outline-style: none; outline-width: initial; outline-color: initial; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; white-space: pre-wrap !important; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 1.3; "><span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">> </span><span class="GD40030CCR ace_keyword" style="color: blue;">stsNWObject1 <- stsNWObject[</span><span class="GD40030CCR ace_keyword" style="color: blue; ">stsNWObject</span><span class="GD40030CCR ace_keyword" style="color: blue; ">$CLUSTER==1, ]
</span><span class="GD40030COR ace_keyword" style="white-space: pre; color: blue; ">> </span><span class="GD40030CCR ace_keyword" style="color: blue; ">summary(stsNWObject1)
</span> [>] sequence object created with TraMineR version 1.8-1 
 [>] 7862 sequences in the data set, 6438 unique 
 [>] min/max sequence length: 288/288
 [>] alphabet (state labels):  
     1=Hout (Home outside)
     2=Ad (Adjacent)
     3=Ne (Near)
     4=Fa (Far)
     5=Hoho (Home home)
     6=Tr (Trip)
 [>] dimensionality of the sequence space: 1440 
 [>] colors: 1=#A1D99B 2=#41AB5D 3=#006D2C 4=#00441B 5=#E5F5E0 6=#000000 
<span class="GD40030CGR">Error in if (any(object == nr)) { : missing value where TRUE/FALSE needed<br><br><br></span>Could anyone help me to understand and resolve this error.<br><br>Thanks, <br><br>Hadrien<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: Monospace; font-size: 13px; line-height: 17px; text-align: -webkit-left; white-space: pre-wrap; "></span></span></pre></span></span></div></body></html>