[Traminer-users] error splitting sts Object

Hadrien Commenges hc at parisgeo.cnrs.fr
Thu Mar 15 18:10:05 CET 2012


Hi, 

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. 

Here is the summary of the big sts object: 

> summary(stsNWObject) [>] 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: * 

And here is how I create the splitted object and the error I get: 

> stsNWObject1 <- stsNWObject[ stsNWObject $CLUSTER==1, ] > summary(stsNWObject1) [>] 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 Error in if (any(object == nr)) { : missing value where TRUE/FALSE needed 


Could anyone help me to understand and resolve this error. 

Thanks, 

Hadrien 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20120315/353dd011/attachment.html>


More information about the Traminer-users mailing list