Skip to Content
R Cookbook
book

R Cookbook

by JD Long, Paul Titer, Jee -Won Lee
May 2022
Beginner to intermediate
667 pages
16h 17m
Korean
Insight
Content preview from R Cookbook
R
118
4장 입력과 출력
berkley <- read
_
csv('http://bit.ly/barkley18', comment = '#')
#>
󻫃󻰧
󻳤󻇃󺹋
󺽔󻞫󼨧󻪻
󺈻󻀇
󻉓󻗬
#> cols(
#> Name = col
_
character(),
#> Location = col
_
character(),
#> Time = col
_
time(format = "")
#> )
또는
URL
을 사용해서 연결을 열고, 연결에서 읽어올 수도 있다. 복잡한 파일들은 이
렇게 하는 게 좋다.
󺙋󻰧
웹은 데이터의 보고다. 데이터를 파일로 다운로드한 뒤
R
로 해당 파일을 읽어올 수
도 있지만, 웹에서 직접 읽는 것이 더 편리하다.
read_csv
,
read_table2
또는
readr
다른
read
함수(데이터의 형식에 적합한)에
URL
을 주면 데이터가 다운로드 및 구문
분석될 것이다. 딱히 번거로울 것도 없다.
URL
을 쓴다는 점을 제외하면 이번 레시피는 앞서 언급한
CSV
파일(레시피
4
.
8
고)이나 복잡한 파일(레시피
4
.
15
)에서 읽어오는 방법과 다를 게 없다. 그러니 앞의
레시피들에 적용되는 설명은 여기에도 적용된다.
HTTP
서버뿐 아니라
FTP
서버의
URL
에도 잘 작동한다는 사실을 기억하자. 즉,
R
FTP
사이트에서
URL
을 사용해 데이터를 읽어올 수 있다는 뜻이다.
tbl <- ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

R Cookbook

R Cookbook

Paul Teetor
R Graphics Cookbook

R Graphics Cookbook

Winston Chang
R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9788966262984