Table Handling

disk.frame 패키지 소개

공지

  • 주석은 가급적 원어를 남겨 놓으니 잘 번역하기를 바란다.

설치

  • 설치 방법은 기존과 마찬가지로 간단하게 작성할 수 있다.
install.packages("disk.frame")
suppressPackageStartupMessages(library(disk.frame))
library(nycflights13)

패키지 주요 아이디어

  • 메모리보다 많은 데이터를 각각의 chunks로 분해하여 하나의 폴더 안에 저장한다. (HDD 디스크 사용)
  • 자세한 셜명은 Giuhub를 참고 (https://github.com/xiaodaigh/disk.frame)

Setup

  • 실습 환경을 구성한다.
setup_disk.frame()
## The number of workers available for disk.frame is 1
# this allows large datasets to be transferred between sessions
options(future.globals.maxSize = Inf)

빠른 시작

disk.frame으로 변환

  • 데이터 객체를 disk.frame으로 변환한다.
# convert the flights data.frame to a disk.frame
# optionally, you may specify an outdir, otherwise, the 
flights.df <- as.disk.frame(nycflights13::flights, overwrite = TRUE)
class(flights.df)
## [1] "disk.frame"        "disk.frame.folder"
flights.df
## path: "/var/folders/zq/ch7gky6n3rzgjf1pd0w2l35w0000gn/T//Rtmp3ymGwx/file61302e8c8834.df"
## nchunks: 1
## nrow (at source): 336776
## ncol (at source): 19
## nrow (post operations): ???
## ncol (post operations): ???
  • 객체가 disk.frame으로 변환된 것을 확인할 수 있다.

GT 패키지 소개

공지

본 블로그는 2020-04-08에 소개된 Great Looking Tables: gt(v0.2) by Richard Iannone 글을 번역한 것이다. 함수와 관련된 설명은 가급적 원어를 직접 인용 했으니, 영어로 직접 함수의 사용처를 음미하시길 바란다.

I. Intro

gt라는 이름은 grammar of tables즉 “테이블의 문법"의 줄임말이며 gt의 목표는 ggplot2와 비슷하게 운영하는 것이다. 특정 테이블을 쉽게 만들 수 있을 뿐만 아니라 다양한 문제를 해결하기 위해 서로 다른 방법으로 재결합할 수 있는 기본 구성요소 집합을 기술하는 역할을 한다.