Question: "header" function in R
0
gravatar for Morteza Hadizadeh
2.4 years ago by
Physiology Research Center, Institute of Basic and Clinical Physiology Sciences, Kerman University of Medical Sciences, Kerman, Iran
Morteza Hadizadeh20 wrote:

Hello everyone, How to add the "header" function to a dataset in R? for example, this command enters in the R, but I encounter the following error in the software.

res<- read.ftable("C:/R Database/Volcano/results.txt", header= TRUE)

Error in read.ftable("C:/R Database/Volcano/results.txt", header = TRUE) : unused argument (header = TRUE)

R software error • 1.9k views
ADD COMMENTlink modified 2.4 years ago by h.mon31k • written 2.4 years ago by Morteza Hadizadeh20

instead use

res <- read.table("C:/R Database/Volcano/results.txt", header= TRUE)

ADD REPLYlink modified 2.4 years ago • written 2.4 years ago by arta580
read.csv(""C:/R Database/Volcano/results.txt", header = T, sep = "\t", stringsAsFactors = F)

change sep argument if separator is not tab, but some thing else.

ADD REPLYlink written 2.4 years ago by cpad011214k
0
gravatar for h.mon
2.4 years ago by
h.mon31k
Brazil
h.mon31k wrote:

header= is not a function, it is an argument to a function. This argument is not used for read.ftable(), hence the error.

See ?read.ftable

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by h.mon31k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 883 users visited in the last hour