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

instead use

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

ADD REPLYlink modified 16 months ago • written 16 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 15 months ago by cpad011211k
0
gravatar for h.mon
16 months ago by
h.mon27k
Brazil
h.mon27k 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 16 months ago • written 16 months ago by h.mon27k
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: 1638 users visited in the last hour