前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >R1基础

R1基础

原创
作者头像
用户10556374
修改2023-05-10 23:10:59
2440
修改2023-05-10 23:10:59
举报
文章被收录于专栏:生信学习~~~生信学习~~~

title: "note1"

output: html_document

date: "2023-05-09"


代码语言:{r setup, include=FALSE}
复制
knitr::opts_chunk$set(echo = TRUE,message = F,warning = F)

R Markdown

代码语言:text
复制
#后面是注释,不会运行,路径补充
# 文件在桌面上,不在工作目录下,怎样读取
# 绝对路径,换了电脑就读不成功
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:

代码语言:{r cars}
复制
summary(cars)

Including Plots

You can also embed plots, for example:

代码语言:{r pressure, echo=FALSE}
复制
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 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • R Markdown
  • 引用生信技能树
    • Including Plots
    领券
    问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档