[Traminer-users] Error when using "seqfplot" with a grouping variable

Arnaud Trollé arnaud_trolle at yahoo.fr
Fri Jul 8 11:24:03 CEST 2016


Hi,
I'm facing an error message when using the "seqfplot" function with the parameter "group" : "Error in if (any(x == nr)) { : missing value where TRUE/FALSE needed".
My grouping variable comes from a cluster analysis I previously carried out (using "agnes").I could see a previous discussion (in 2012) where possible causes for this error were mentioned :http://lists.r-forge.r-project.org/pipermail/traminer-users/2012-March/000101.html
Unfortunately, I checked everything, i.e. I do not have any NA and the length of my grouping variable is the same as the number of rows in my sequence object, but I still have this error message.
Here is a part of my code : contrat.om <- seqdist(contrat.seq, method = "OM", indel = 1, sm ="TRATE")contrat.ward <- agnes(contrat.om, diss = TRUE, method = "ward")
contrat.cl4 <- cutree(contrat.ward, k = 4)cl4.contrat.lab <- factor(contrat.cl4, labels = paste("Cluster",1:4))any(is.na(cl4.contrat.lab))x11()
seqfplot(contrat.seq, group = cl4.contrat.lab, border = NA, cex.legend = 0.6, xtlab = c("2013","2016"))
I do not see the reason why I get this error.
Thank you in advance for your help.
Kind regards,Arnaud.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/traminer-users/attachments/20160708/e285bbf0/attachment.html>


More information about the Traminer-users mailing list