Skip to Content
高效R语言编程
book

高效R语言编程

by Colin Gillespie, Robin Lovelace
August 2018
Intermediate to advanced
227 pages
4h 16m
Chinese
China Electric Power Press Ltd.
Content preview from 高效R语言编程
110
6
使用
tidyr
整理数据
使用
dplyr
处理数据。
使用数据库
使用
data.table
处理数据
软件配置
本章需用到一些数据清理与处理的包。检查并确保它们已被安装,使用下列
命令加载它们:
library("tibble")
library("tidyr")
library("stringr")
library("readr")
library("dplyr")
library("data.table")
尽管
RSQLite
ggmap
不是本章的核心,但本章的几个例子中会用到它们。
高效数据木匠的
5
条高级技巧
1.
长远来看,项目的一开始花费时间准备数据可避免将来失败造成的大量时
间浪费。
2.
“整洁的数据”提供了组织数据的概念,
tidyr
包提供一些该方面的函数。
3.
tibble
包中的 data_frame 类使得数据集可高效输出并易于使用。
4. dplyr
提供了快速直观的数据处理函数;
data.table
在做某些数据处理应用
时,有着不可思议的速度。
5.
%>% 管道操作有助于理清复杂的数据处理流程。
高效的
tibble
数据框
tibble
包为
R
专门定义了新的数据框类 tbl_df。这些
tibble diffs
它们的创造
者所建议的发音,
https://github.com/hadley/tibble
)类似基础类 data.frame
高效数据木匠
111
但它们具有更人性化的打印、子集提取和因子操作。
一个
tibble
数据框是一个包含三个类的
S3
对象,分别是 tbl_df ...
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进行数据清理、分析与可视化

数据科学之编程技术:使用R进行数据清理、分析与可视化

迈克尔 弗里曼, 乔尔 罗斯
R数据科学

R数据科学

Hadley Wickham, Garrett Grolemund

Publisher Resources

ISBN: 9787519820855