fread

Published by onesixx on

https://github.com/Rdatatable/data.table/wiki/Convenience-features-of-fread
  • read.table() 대신 사용가능
  • Text파일을 읽어들이는데 많이 사용됨.
    Xlsx파일은 readxl::read_xlsx를 사용
  • 빠르고
  • character를 factor로 자동변환하진 않는다.

fread ( input= 파일명 or URL,
header= “auto”, sep=”auto” ,
stringsAsFactors=FALSE,
drop= NULL, select=NULL , colClasses=NULL
)

R
R
example data (csv)

colClasses

character–>datetime 변경하고 싶을때, colClasses=c(“날짜시간으로바꾸고싶은문자변수명”=”POSIXct”)
“Date”,”integer”,”numeric”, “character”

R
https://www.r-bloggers.com/2013/09/using-colclasses-to-load-data-more-quickly-in-r/
R

drop/select

R

https://stackoverrun.com/ko/q/5099655

R

ex

R
Categories: Reshaping

onesixx

Blog Owner

guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x