R

fix for "cannot allocate vector of size"

More package author’s introduction, please access this link Instead of loading everything at once into your RAM, you divide your data into chunks. To quote author of the disk.frame package: “we go from”R can only deal with data that fits in RAM"

caching for faster Shiny app

To have faster performance with Shiny App, you can pass this command to yoru script. # %>% bindCache()

learnr to guide students

Teaching statistics or data science, we can use learnr package. # library("learnr") To collect data, we can use learnrhash # library("learnrhash") Remember to adjust parameters so your Shinyapp.io can handle the number of students you have in the class.

use dplyr in Python - siuba library

Use siuba library in Python to preserve all your skills from dplyr package in R pip install siuba You can see TidyTuesday for tutorial Or Learn Siuba

Connect WRDS in R

Connect from R to Wharton Research Data Services to set up connection from R to WRDS (here) library(RPostgres) library(tidyverse) # I've set up wrds connection before hand. # Please use your username and password here.

flipbooks

Flipbooks can be used for: Education Reference Communication Transparency library(flipbookr) cars %>% filter(speed > 4) %>% ggplot() + aes(x = speed) + #BREAK aes(y = dist) + #BREAK geom_point( alpha = .

psychological experiments

Use jaysire package to build flexible behavioral experiments in R. Why? Better workflow Free Cutomizable remotes::install_github("djnavarro/jaysire")

renv

Check where your package is installed find.package("dplyr") ## [1] "C:/Program Files/R/R-4.0.3/library/dplyr" All projects use the same library path. Then for each project, you need different library dependencies. Intializing a project renv::init() A .

Patent Databases

Comprehensive patent data can be found here United States NBER patent data or link Search link for individual patent: link Patent API USPTO - United States patent and Trademark Office Patent ranking by orgs Bulk Data Storage System: repository for raw public bulk data For Researcher Patent Assignment Dataset details information of patent assignment since 1970 with schema and description and code Pre-Grant Publications Data Download Tables with example code note that organizaiton here is different from Compustat and CRSP, hard to match.

Linking Financial Databases (CRSP and Compustat)

Information can be found in CRSP/COMPUSTAT MERGED DATABASE GUIDE Change Identifiers: Ticker: can be reassign to another company - abbreviation used to uniquely identify publicly-traded shares of a stock CUSIP: A company can have multiple CUSIPS due to structural changes.