using plot.momentuHMM in rmarkdown files #181
-
Hi ya'll, I'm having some issues with the plot.momentuHMM function while working within rmarkdown files. I'm not sure how to store the density/histogram plots from plot.momentuHMM as objects to use with cowplot. I'm looking to do something like this: m1_warnd <- fitHMM(df_prepped, p <- plot(m1_warnd, ask = FALSE) p1 <- p[[1]] plot_grid(p1, p2, labels = c('A', 'B'), label_size = 12) This code assumes that plot.momentuHMM would returns a list containing all the plot objects. However, it seems to return a list with the bool value for the ask parameter. ultimately i'm looking to store the plot.momentuHMM plot objects as objects i can pass around in the code. Like in the above code. Is there a way to get these objects to do this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Before {momentuHMM} v2.0.0, you'd normally need to save the plots (e.g. as a PDF) and include them in your document using
However, with v2.0.0 (currently only available in the Here's an example using the returned estimates:
And here's an example using the recorded density/histogram plots:
To create your own density/histogram plots, see #93. |
Beta Was this translation helpful? Give feedback.
Before {momentuHMM} v2.0.0, you'd normally need to save the plots (e.g. as a PDF) and include them in your document using
\includegraphics
:However, with v2.0.0 (currently only available in the
develop
branch on GitHub), one can use thereturn
argument to: 1) return the estimates, standard errors, and confidence intervals of the…