前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >第五课 文件读写

第五课 文件读写

原创
作者头像
小王同学@生信
发布2023-04-12 16:10:05
2090
发布2023-04-12 16:10:05
举报
文章被收录于专栏:小王的生信学习道路

title: "class5"

author: "xiaowang"

date: "2023-04-12"

output: html_document


File read and write

代码语言:text
复制
ex1<-read.table("ex1.txt")
ex1<-read.table("ex1.txt",header = T)
ex2<-read.csv("ex2.csv")
ex2<-read.csv("ex2.csv",row.names = 1,check.names = F)
soft<-read.table("soft.txt",header = T,fill = T)
soft2<-read.table("soft.txt",header = T,sep="\t")
dim(soft2)
代码语言:txt
复制
## [1] 1000    5
代码语言:text
复制
colnames(soft2)
代码语言:txt
复制
## [1] "ID"       "SEQUENCE" "GeneName" "GB_ACC"   "SPOT_ID"
代码语言:text
复制
write.csv(soft,file = "soft.csv")
save(soft,file = "soft.Rdata")

引自生信技能树

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:

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • File read and write
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档