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语言编程
30
2
Windows
下,
installr
包用于处理系统级依赖的管理与更新
R
包。例如
Windows
下用来编译
C/C++
代码的
Rtools
包可用如下命令安装:
installr::install.rtools()
更新
R
高效
R
配置应包含更新包,可通过下面代码更新所有包:
update.packages()
缺省情况下,该函数的 ask 参数设为 TRUE,从而控制下载到你系统中的更新。
因为更新几十个大的包会消耗很大比例的可用系统资源,所以控制下载是有
必要的。
可以将 utils::update.packaged(ask=FALSE) 添加到
.Rprofile
启动文件(详
见“
Rprofile
文件”小节)的 .Last 函数中。感谢
Richard Cotton
提供此技巧。
RStudio
通过菜单
Tools
Check for Package Updates
操作,为更新
R
软件包
提供了更具交互性的方法。
RStudio
提供了许多类似的节省时间方法,详见本
章后面“安装和更新
RStudio
”一节。下一节(练习后),我们将讲述如何使
用启动文件配置
R
练习
1.
你所用的
R
版本?是最新版本吗?
2.
你的
R
包有需要更新的吗?
R
启动
每次
R
启动时,默认会执行两个文件脚本,正如 ?Startup 所描述。本节将详
述如何配置这些文件,以便保存
API
密钥或加载常用函数。在学习如何修改
这些文件之前,先了解一下如何设置
R
的启动参数以忽略它们。在你想打开
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