Hello,
I was kindly given a link by @martin.R for layouts. I downloaded the stargazer package (the name sounded coolest).
but it turns out I can not figure out how to use it and I was wondering which of the packages (xtable, stargazer, pander, tables, ascii) you would recommend and that are easy to use?
I tried the knitr kable function but it seemed a bit limiting (not look very exciting layoutsl), or maybe I am not understanding it correctly.
As an example I am trying to make my data below more presentable in markdown.
Thanks in advance!
Christine
reprex::reprex_info()
#> Created by the reprex package v0.1.1.9000 on 2017-11-16
Jobsatisfaction %>%
count(year, type) %>%
group_by(year) %>%
mutate(prop = n / sum(n)) %>%
select(-n) %>%
spread(key = type, value = prop) %>%
arrange(desc(year))
#> Error in Jobsatisfaction %>% count(year, type) %>% group_by(year) %>% : could not find function "%>%"
reprex::reprex_info()
#> Created by the reprex package v0.1.1.9000 on 2017-11-16
Jobsatisfaction %>%
group_by(year, type) %>%
tally() %>%
group_by(year) %>%
mutate(x = n / sum(n)) %>%
ggplot() +
geom_col(aes(
x = factor(year),
y = x,
fill = factor(type)
), position = "stack")
#> Error in Jobsatisfaction %>% group_by(year, type) %>% tally() %>% group_by(year) %>% : could not find function "%>%"