I'm working on a Monte Carlo simulation that spits out a matrix with 10000 observations of 8 numeric variables. I have summarized the 8 variables using dplyr as follows:
# A tibble: 2 x 8
V1 V2 V3 V4 V5 V6 V7 V8
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 29196. 12470. 6821. 5958. 22375. 6512. 10931. 2732.
2 1675. 419. 59.1 15.5 1636. 408. 858. 312.
where the first row is the mean of each variable and the second row is the standard deviation for each variable. How would I use this summary statistics to create a bar plot with 8 bars whose height is the mean and whose error bar is the standard deviation? I'm mainly not sure how to fill out the "aes" section of the ggplot.
Thank you in advance.
df2 <- as.data.frame(t(df1))
– alistaire