Background

The first guide to this package can be found here.



Installation

You can install from github with devtools:

library(devtools)
devtools::install_github("jalapic/simpletable")



Further Introductory Examples


Rownames

The rownames of a dataframe won't automatically be included as the first column. To get them to show you need to do something like this:



library(simpletable)
tablecode(cbind(car=rownames(mtcars), mtcars), tabletype="minimal")



tablecode(cbind(car=rownames(mtcars), mtcars), tabletype="gridtable")



Soccer Example !

Here's an example using data from my engsoccerdata. I'm using a function in that package called maketable which converts raw soccer scores into an end of season final league standings table. I've happened to pick the final standings for the 1994/95 season for the top tier of English soccer. I then turn that into a more attractive table with tablecode from simpletable:


library(engsoccerdata)
library(dplyr)
engsoccerdata2 %>% 
  filter(Season==1994 & tier==1) %>% 
  maketable() %>%
  as.data.frame() %>%
  tablecode(tabletype="another")






jalapic/simpletable documentation built on May 18, 2019, 11:18 a.m.