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: