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语言编程
高效安装
47
RStudio
可以在任何时候自动完成而不是按
Tab
键时自动完成。在前例中,当
你输入前三个字母 rno时,将触发
RStudio
的自动完成功能。如果只输入一
个字符,然后按
Tab
键也将触发自动完成功能:自动完成功能不是替代
Tab
而是对其进行补充。请注意在
RStudio
中,输入 rn 后按
Tab
键,将提供四个
选项,比前面段落提到的在基础
R
中提供的 rnbinom rnorm 了两个选项
RNGkind RNGversion这说明了
RStudio
R
一样都不区分大小写的。这
很好,因为
R
没有统一的函数命令风格。
相比
R
语言的内置命令,
RStudio
在对象和文件名的自动完成方面也更智能化。
输入
US
后,单击
Tab
键来测试这项功能。单击向下方向键直至 USArrests
被选中,然后按回车键即自动完成输入。最后,输 $ 将在屏幕上显示下列
文本,并弹出四个选项,以便你使用下拉箭头选择感兴趣的变量。
USArrests$ #
将在
RStudio
出现下拉菜单列
举个复杂点的例子,长变量名 spdf@data$varname 存储在类 SpatialPolygon
sDataFrame[^footslot]基础空间包
sp
定义的类)的数据槽(
slot
)中。本
例中spdf 是对象名,data 数据槽,varname 是变量名。通过提供简写方
spdf$varname 的自动完成功能,
RStudio
使
S4
等对象更易使用
6
。此外
RStudio
还能发现藏在子文件夹下的文件。输入
"
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