But I've hit a snag. I want to be able to show student how to format their output tables, e.g. using kableExtra or similar packages. I figured I'd need to do a lot of experimentation to get this working, but I'm stuck at the first hurdle.
When I run most base R functions, or indeed functions from other packages, I generally get a dataframe or list saved to the local environment. So if I run this...
Code: Select all
lm_output <- lm(Sepal.Width ~ Petal.Width, iris)
Code: Select all
lm_output$coefficients
When I use the jmv() package, e.g.
Code: Select all
library(jmv)
corr_output <- corrMatrix(iris, vars=vars(Sepal.Width, Petal.Length, Petal.Width),
pearson = TRUE, sig = TRUE, flag = TRUE, n = TRUE, hypothesis = "corr")
How do I go about accessing tables and values, please? Is there a way to assign the output to an object in a similar way to how it works with base R functions etc?
(I'm hoping I've made that clear, but I'm not certain, so please do let me know if you need more detail.)