Question: "header" function in R
0
gravatar for Morteza Hadizadeh
18 months 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 • 955 views
ADD COMMENTlink modified 18 months ago by h.mon28k • written 18 months ago by Morteza Hadizadeh20

instead use

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

ADD REPLYlink modified 18 months ago • written 18 months ago by arta540
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 18 months ago by cpad011212k
0
gravatar for h.mon
18 months ago by
h.mon28k
Brazil
h.mon28k 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 18 months ago • written 18 months ago by h.mon28k
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: 1794 users visited in the last hour