Skip to content
Recipes for using R's data.table package
HTML Other
  1. HTML 99.9%
  2. Other 0.1%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cookbook
data Add chapter 9 Nov 3, 2019
renv
.Rprofile Add renv.lock Oct 29, 2019
.gitignore Add .gitignore Nov 14, 2019
Makefile
README.md Update README. Nov 11, 2019
renv.lock

README.md

data.table cookbook

This is a clone of the fantastic Pandas cookbook by Julia Evans, but using the excellent R's data.table package.

This cookbook provides you with concrete examples of analyzing real-world data so that you'll find it easier to getting started with data.table.

I am surprised that Julia's repo currently has about 4.1k stars (as of Oct 2019). To put the number in perspective, two of the most popular R packages dplyr and ggplot2 has 3.1k and 4.1k stars respectively (data.table , by the way, has been starred 2.1k times).

This project is my attempt to increase the reach of R in general and data.table in particular, especially to beginners. I try my best to keep the work of Julia as original as possible and also provide more detailed explanation where necessary. Of course, all remaining errors are mine.

table of contents

how to use this cookbook

  • The easiest way is to clone the repository to your local computer. You need the latest version of R (3.6.1) installed before you do the following instructions.

If you prefer working on command line:

git clone https://github.com/chuvanan/rdatatable-cookbook.git
cd rdatatable-cookbook # move to cookbook directory
R # start R session, right after initiation R will attempt to install `renv` (locally)
renv::restore() # restore all dependencies

In case you are more comfortable on RStudio, you need to set folder rdatatable-cookbook as working directory and run renv::init() and later renv::restore().

  • The above code will download the repository to your machine. And the great renv package will do the critical job that makes sure you have all required packages to run the code yourself.

  • All R Markdown files are stored in folder cookbook. You are ready to go.

contribute!

  • I would love your feedback on anything. Just drop me an email or send a pull request.

license

translations

  • A Vietnamese version of this repo can be found here (work in progress).
You can’t perform that action at this time.