Bigmemory 套件家族

R 的可擴展資料處理

Michael Kane

Assistant Professor, Yale University

目前進度…

  • 匯入
  • 取子集
  • 指派值給 big.matrix 物件
R 的可擴展資料處理

相關套件

表格與摘要
  • biganalytics
  • bigtabulate
R 的可擴展資料處理

相關套件

線性代數
  • bigalgebra
R 的可擴展資料處理

相關套件

配適模型
  • bigpca
  • bigFastLM
  • biglasso
  • bigrf
R 的可擴展資料處理

FHFA 房貸資料集

  • 2009–2015 年期間,同時由 Federal National Mortgage Association(Fannie Mae)與 Federal Home Loan Mortgage Corporation(Freddie Mac)持有或證券化的房貸
  • FHFA 的房貸資料可在此線上取得 here
  • 我們將聚焦於隨機抽樣的 70000 筆貸款
R 的可擴展資料處理

範例 1:bigmemory 結合 bigtabulate

library(bigtabulate)

# How many samples do we have per year? bigtable(mort, "year")
 2008  2009  2010  2011  2012  2013  2014  2015 
 8468 11101  8836  7996 10935 10216  5714  6734
# Create nested tables
bigtable(mort, c("msa", "year"))
  2008 2009 2010 2011 2012 2013 2014 2015
0 1064 1343  998  851 1066 1005  504  564
1 7404 9758 7838 7145 9869 9211 5210 6170
R 的可擴展資料處理

一起來練習吧!

R 的可擴展資料處理

Preparing Video For Download...