[Traminer-users] seqmtplot()

Gilbert Ritschard Gilbert.Ritschard at unige.ch
Tue Aug 14 17:47:33 CEST 2018


I would like to encourage all TraMineR users to ask their questions on stackexchange: StackOverflow (SO) for R-code related questions and CrossValidated (CV) for questions regarding statistical interpretation and methodological issues. (See http://traminer.unige.ch/contrib.shtml ). You will reach there a much wider audience and thus increase chances to get good answers. 

This is in particular true for the question asked here, which is more a basic R question than a TraMineR-related one. (The question could have been posted on SO with the 'r' and 'traminer' tags). 

Anyway, the solution is simply:

pmeant <- prop.table(cbind(table1,table2),2)
barplot(100*pmeant)

Best.
Gilbert


From: Traminer-users <traminer-users-bounces at lists.r-forge.r-project.org> On Behalf Of Karina Videgain
Sent: lundi 13 août 2018 22:52

I want to plot the mean time as distribution of the average number of years in each state by patways group (cluster) in the same graph/image. I can't find the way to do it with seqmeant. I'm trying with barplot but the output is not good enough.

example:
table1 <- seqmeant(seq[data$cluster==1, ], weighted=FALSE, prop=FALSE, serr=FALSE)
table2 <- seqmeant(seq[data$cluster==2, ], weighted=FALSE, prop=FALSE, serr=FALSE)

par(mfrow = c(1,2))
barplot(prop.table(table1),2)
barplot(prop.table(table2),2)


Do you have any suggestion? I would like to get a bar with ylim=c(0,100) for each pathways in the same plot.


More information about the Traminer-users mailing list