Chapter 01—Introduction to R
1.getwd():list the current working directory. (即获得当前工作路径)
2.setwd("mydirectory"):change the current working directory to mydirectory.(改变当前工作路径为mydirectory)
3.dir.create("mydirectory"):创建一级路径。
4.ls():list the objects in the current working space.(列出当前工作区的所有objects)
注意:
(1)如果setwd("mydirectory")中的mydirectory与getwd()函数求得的路径不一样,则会报错。

(2)解决(1)中问题的办法:使用dir.create("mydirectory")函数先创建一级路径。
注意:路径mydirectory中只能新创建最后一级路径;否则 ,创建路径无效。

例如:我在H盘中创建了文件夹myprojects,即已存在的路径为"H:/myprojects" ,
再创建路径"H:/myprojects/Listing1.1",即只创建了一级路径,是可以的;
但若创建路径"H:/myproject/Listing1.1",会报错,因为myproject和Listing1.1这两个文件夹都是新创建,即创建了两级路径。
Listing1.1



5.c(object1,object2...objectN):combine its arguments into a vector or list.
6.mean(object):calculate the object's mean.(求平均值)
sd(object):calculate the object's standard deviaton.(求标准差)
cor(object1,object2):calculate the object1 and object2's correlation.(求相关系数)
plot(object1,object2):draw the object1 and object2' scatter plot in figure.
7.savehistory("mydirectorys"):save the commands history to myfile(default=.Rhistory).(保存命令行记录)
save.image("mydirectorys"):save the workspace to myfile(default=.RData). (保存当前工作区)
8.loadhistory("mydirectory"):reload a command's history(default=.Rhistory).
load("mydirectory"):load a workspace into the current session(default=.RData).

Chapter 01—Introduction to R的更多相关文章
- PRML Chapter 1. Introduction
PRML Chapter 1. Introduction 为了防止忘记,要把每章的重要内容都记下来,从第一章开始 2012@3@28 今天又回去稍微翻了一下第一章内容,发现第一次看的时候没有看透,每次 ...
- 【翻译】A (very) short introduction to R R的简短介绍
[前言] 本文翻译自Paul Torfs & Claudia Brauer的文章A (very) short introduction to R.其中比较简单的地方没有翻译,不好用中文描述的地 ...
- JVM Specification 9th Edition (2) Chapter 1. Introduction
Chapter 1. Introduction 翻译太累了,我就这样的看英文吧. 内容列表 1.1. A Bit of History 1.2. The Java Virtual Machine 1. ...
- ML Lecture 0-1: Introduction of Machine Learning
本博客是针对李宏毅教授在Youtube上上传的课程视频<ML Lecture 0-1: Introduction of Machine Learning>的学习笔记.在Github上也po ...
- TIJ——Chapter One:Introduction to Objects
///:~容我对这个系列美其名曰"读书笔记",其实shi在练习英文哈:-) Introduction to Objects Object-oriented programming( ...
- 【Introduction】R语言入门关键小结
写在前面:本博客为本人原创,严禁任何形式的转载!本博客只允许放在博客园(.cnblogs.com),如果您在其他网站看到这篇博文,请通过下面这个唯一的合法链接转到原文! 本博客全网唯一合法URL:ht ...
- 【计理05组01号】R 语言基础入门
R 语言基本数据结构 首先让我们先进入 R 环境下: sudo R 赋值 R 中可以用 = 或者 <- 来进行赋值 ,<- 的快捷键是 alt + - . > a <- c(2 ...
- Chapter 1. Introduction gradle介绍
We would like to introduce Gradle to you, a build system that we think is a quantum leap for build ...
- Docker 01 Introduction
Docker的组成: Docker Engine,一个轻量级.强大的开源容器虚拟化平台,使用包含了工作流的虚拟化技术,帮助用户建立.并容器化一个应用. Docker Hub,提供的一个SaaS服务,用 ...
随机推荐
- java 项目时间和服务器时间不一致
今天线上项目关于时间的几个任务都出了问题,查看日志发现日志的时间不对,用的是log4j,日志输出的时间都早了很长时间. 1 首先先登上服务器查看了服务器的系统时间 linux下 date命令 时间正确 ...
- 查找一个卷对应的osd
1.首先找到卷的id: 2.使用rados命令找到卷上面的对象数据: 3.通过ceph osd map命令可以查询到对象对应的pgid及pg对应的osd:
- VSCode JAVA环境配置使遇到的几个小问题
1.出现的问题: The JAVA_HOME environment variable points to a missing or inaccessible folder等三个报错! 2.说明及解决 ...
- winds添加静态路由
如上图所示,wan口设备箱访问路由器栏口设备 route -p add 192.168.21.0 mask 255.255.255.0 192.168.0.176 -p 表示永久路由,重启后不丢失 ...
- K8S入门系列之集群二进制部署-->node篇(三)
node节点组件 docker kubelet kube-proxy kubernetes-server-linux-amd64.tar.gz(相关的这里都能找到二进制文件!) falnnel 1. ...
- Zabbix-(四)邮件、钉钉告警通知
Zabbix-(四)邮件.钉钉告警通知 一.前言 在之前的文章里,通过Zabbix对主机的磁盘.CPU以及内存进行了监控,并在首页Dashboard里创建了监控图形,但是只有当我们登录到Zabbix后 ...
- java编程思想第四版第九章习题
第三题 package net.mindview.interfaces; abstract class Base{ public Base(){ print(); } abstract void pr ...
- pat 1124 Raffle for Weibo Followers(20 分)
1124 Raffle for Weibo Followers(20 分) John got a full mark on PAT. He was so happy that he decided t ...
- 力扣(LeetCode)验证回文字符串II 个人题解
给定一个非空字符串 s,最多删除一个字符.判断是否能成为回文字符串. 示例 1: 输入: "aba" 输出: True 示例 2: 输入: "abca" 输出: ...
- LeetCode51 N皇后——经典dfs+回溯(三段式解法)
代码如下: class Solution { public: // record[row] 该行对应的列 vector<vector<string> > ans; // 结果集 ...