Translating Stata to R

Welcome. This website is for Stata users who are interested in learning R. But it could also be useful for those going the other way around. We provide side-by-side code snippets for common tasks in both Stata and R, so that users have a dictionary for navigating across the two languages.

There are two main pages (โœŒ๏ธ๐Ÿ“„) on the site:

  1. Data wrangling (๐Ÿ—„๐Ÿงน) with data.table
  2. Regression analysis (๐Ÿ’ป๐Ÿ“ˆ) with fixest

There are other great R packages that work well and are easy to use. But data.table and fixest are blazingly fast (๐Ÿƒ๐Ÿป๐Ÿ’จ), extremely powerful (๐Ÿ’ช๐Ÿป๐Ÿ˜Ž), and flexible (๐Ÿ‘Œโœจ). Learning just these two libraries will help you to avoid "package bloat", enabling you to tackle an exhaustive list of data science and econometric tasks with maximum efficiency.

See the icons in the top right corner for various site options. You can search for keywords or commands, change the theme to light or dark mode to suit your preferences, and go to the underlying GitHub repoopen in new window where all the source code is located. Please let us know if you have suggestions or spot any errors.