Consider the following data frame:
set.seed(123)
dat1 <- data.frame(Loc = rep(c("a","b","c","d","e","f","g","h"),each = 5),
ID = rep(c(1:10), each = 2),
var1 = rnorm(200),
var2 = rnorm(200),
var3 = rnorm(200),
var4 = rnorm(200),
var5 = rnorm(200),
var6 = rnorm(200))
dat1$ID <- factor(dat1$ID)
I am using the RVAideMemoire
package to perform permutation ANOVAs.
library(RVAideMemoire)
perm <- multtest.gp(dat1[,3:8], dat1[,1], test = "perm")
The output provides access to the mean and SE for each Loc
through the list element tab
:
a <- perm$tab
I would like to plot the mean for each group (geom_point
) +/- the standard error, and facet them by var
. What is the simplest way that I can get a
into a ggplot friendly format to make this graph, and use the original labels for the plots using the original Loc
s names from dat1
(the columns are labeled mean.x,
and SE.n
)?