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语言编程
116
6
2008
)的主题,本节仅涵盖一些关键操作。关键是理解那些将杂乱数据转换
成标准输出形式的原则。
同样的原则也可应用到模型结果的表示上。
broom
包提供了模型结果的标准
输出格式,相关内容参见
http://bit.ly/broomvignette
上的
broom
简介。函数
broom::tidy() 被广泛用于模型数据,并以标准数据框格式返回模型输出结
果。
通常,使用变量名非标准求值更高效,因为这些可以通过
RStudio
自动完成。
(此段理解可参见
http://blog.csdn.net/tanzuozhev/article/details/50597233
有些情况下,你可能想使用标准求值,
并采用引号包裹的变量名。
为此,
你可以添加 _
dplyr
tidyr
的函数名中,以便允许使用标准求值。
separate(agesex_df, agesex, c(
"
sex
"
,
"
age
"
), 1) 的标准求值形式是
separate_(agesex_df, agesex, c(
"
sex
"
,
"
age
"
), 1)
正则表达式
正则表达式(俗称
regex
)是一门描述与操作字符串的语言。
R
中有一些这方
面的书籍以及几本好的教程,例如
Gaston Sanchez
Trowchez Editions
)的
Handling and Processing Strings in R
》。因
此这里我们仅仅涉及本主题的皮毛,
介绍什么是正则表达式。
Regex
是一个高深的话题。
但从数据清理的角度上 ...
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