Skip to Content
R 语言经典实例(原书第 2 版)
book

R 语言经典实例(原书第 2 版)

by J.D. Long, Paul Teetor
June 2020
Beginner to intermediate
522 pages
9h 6m
Chinese
China Machine Press
Content preview from R 语言经典实例(原书第 2 版)
52
2
优先级。
2.11.4 另请参阅
关于向量之间运算的细节,参阅 2.10 节;关于矩阵的运算,参阅 5.15 节;关于如何定
义所需要的运算符,参阅 12.17 节。可以查看 R 软件中算术运算与语法的帮助页面,也
可以参阅
R in a Nutshell
https://oreil.ly/2wUtwyf
)第 5 章和第 6 章的内容。
2.12 减少输入,得到更多命令
2.12.1 问题
你对于输入大量长长的命令,尤其是不断重复输入同一命令感到枯燥。
2.12.2 解决方案
打开一个编辑器窗口将经常使用的 R 代码存放其中,并直接从该窗口中执行这些命令。
在命令行仅仅输入一些简短的或者一次性的命令。
完成后,你可以把积累的命令存储为一个脚本文件,以便以后使用。
2.12.3 讨论
典型的 R 软件初学者会在控制台窗口中键入一个表达式,然后查看结果。当他有信心
后,就开始输入更加复杂的表达式,甚至开始输入多行表达式。很快,他一遍又一遍地
输入相同的多行命令(可能只有很小的变化),以便执行日益复杂的计算。
经验丰富的 R 用户通常不会重新键入复杂表达式。他们可能会输入相同的表达式一次或
两次,当他们意识到这些命令有用且可重复使用时,他们会将其剪切并粘贴到编辑器窗
口中。在以后需要使用部分命令时,他们会在编辑器窗口中选中这部分命令,并让 R
执行,而不是重新输入这些命令。这种技术特别强大,因为他们的代码片段有时候会演
变成很长的代码块。
RStudio 中,IDE 中的一些快捷方式可以促进这种工作方式 ...
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

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

机器学习实战:基于Scikit-Learn、Keras 和TensorFlow (原书第2 版)

Aurélien Géron
大规模数据分析和建模:基于 Spark 与 R

大规模数据分析和建模:基于 Spark 与 R

Javier Luraschi, Kevin Kuo, Edgar Ruiz
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey

Publisher Resources

ISBN: 9787111656814