R lang : handy table functions
All starts with the data.
Read CSV file
mydata = read.csv("~/Downloads/sales.csv")
And if will output it, very probably it will look like a big mess
Making table pretty
There are few way to make table pretty
- Use dplyr library
install.packages("dplyr")
library(dplyr)
- Convert dataframe to pretty dplyr dataframe
mydata = as_tibble(mydata)
Now mydata will look more structured, like this
BUT we can see only first N rows. Which is not comfortable
OUTPUT all rows
print(tbl_df(mydata), n=500)
#n - number of rows
But still we can't see all fields. SO we can make another thing
DT package
It's a cool library which make comfortable table view
install.packages("DT")
library(DT)
datatable(mydata)
Now it will look pretty cool. So you can see all fields and paginate.