[R] Help on plot from transition matrix

Luis Fernando García |uy@g@rc|@ @end|ng |rom gm@||@com
Mon Aug 24 18:43:39 CEST 2020


Thanks Jim,

I do not know what happened, I will try the question again.

Best

El lun., 24 ago. 2020 a las 5:47, Jim Lemon (<drjimlemon using gmail.com>)
escribió:

> Hi Luis,
> As so often happens, the image didn't make it. Try PNG or PDF format.
> Without seeing what you want, it's only guessing.
>
> Jim
>
> On Mon, Aug 24, 2020 at 6:34 PM Luis Fernando García
> <luysgarcia using gmail.com> wrote:
> >
> > I am wanting to make a flow diagram like the one attached as an example
> for
> > the given dataset.
> >
> > The idea is to plot a flow diagramm using the probabilities given by a
> > transition matrix like the displayed in the example below. I have found
> > some tools like DiagrammeR which might work for this purpose, but it
> works
> > by introducing values manually. I wanted to know if there exists any
> > package able to plot automatically the flow diagram, given the transition
> > probabilities.
> >
> > Thanks in advance.
> >
> > #######
> >
> > library(TraMineR)
> >
> > h2a=c("Q-X-Q-Y-W-Z-P")
> >
> > h3a=c("Q-X-Q-Y-W-Z-P-Q-M-P-Q-A")
> >
> > h4a=c("Q-X-Q-X-Q-X-Q-Y-W-Z-C-B-Q-M-B-Q-A")
> >
> > h6a=c("Q-X-Q-X-Q-Y-W-Z-P-Q-P-Q-M-Q-A")
> >
> > h7a=c("Q-Y-W-Z-P-Q-B-Q-M-A")
> >
> > h8a=c("Q-Y-W-Z-P-B-Q-M-Q-A")
> >
> > h9a=c("Q-X-Q-W-Z-B-Q-A")
> >
> > h10a=c("Q-Y-W-Z-Q-A")
> >
> > h11a=c("Q-Y-W-Z-B-Q-P-B-Q-M-A")
> >
> > h12a=c("Q-W-Z-B-P-Q-A")
> >
> > h13a=c("Q-X-Q-Y-W-Z-P-Q-A")
> >
> > h14a=c("Q-X-B-X-Q-X-B-Q-X-Q-X-Q-Y-W-Z-B-P-B-Q-A")
> >
> > h15a=c("Q-X-Y-W-Z-B-P-Q-B-Q-A")
> >
> > h16a=c("Q-X-Q-B-Q-X-B-X-Q-Y-W-Z-P-B-Q-A")
> >
> > h17a=c("Q-X-Q-X-B-X-Q-W-Z-P-B-P-Q-A")
> >
> > h18a=c("Q-Y-W-Z-B-P-Q-B-Q-P-Q-M-B-P-A")
> >
> > h19a=c("Q-W-Z-B-P-Q-P-Q-M-Q-A")
> >
> >
> a=c(h2a,h3a,h4a,h6a,h7a,h8a,h9a,h10a,h11a,h12a,h13a,h14a,h15a,h16a,h17a,h18a,h19a)
> >
> > a
> >
> > library(TraMineR)
> >
> >
> i1=seqdef(c(h2a,h3a,h4a,h6a,h7a,h8a,h9a,h10a,h11a,h12a,h13a,h14a,h15a,h16a,h17a,h18a,h19a))
> >
> > seqtrate(i1)
> > ______________________________________________
> > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list