title: "note1"
output: html_document
date: "2023-05-09"
knitr::opts_chunk$set(echo = TRUE,message = F,warning = F)
#后面是注释,不会运行,路径补充
# 文件在桌面上,不在工作目录下,怎样读取
# 绝对路径,换了电脑就读不成功
x1 = read.csv("C:/Users/win10/Desktop/x.csv")
# 相对路径,文件的相对位置正确,则可以读成功
x1 = read.csv("../x.csv")
# 把x.csv放进了工作目录下的test文件夹里
x1 = read.csv("test/x.csv")
# 把整个biotrainee换个位置或者发给别人,仍然可以读取成功
# >是R语言的命令提示符
# ()前面的单词是函数,【】前面是向量,因为是向量取子集专属符号
# 文件都在工作目录下面,getwd()查看工作目录放在哪里
# +表示命令不完整;补全或按ESC退出
# R Mrakdown:CTAL+ALT+i即可插入3个反引号(tab键上面的波浪号)
# 数据类型class(),numeric数据型,character字符型,logical逻辑型
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
You can also embed plots, for example:
plot(pressure)
Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。