"header" function in R
1
0
Entering edit mode
6.0 years ago

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 • 6.9k views
ADD COMMENT
0
Entering edit mode

instead use

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

ADD REPLY
0
Entering edit mode
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 REPLY
0
Entering edit mode
6.0 years ago
h.mon 35k

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 COMMENT

Login before adding your answer.

Traffic: 1515 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6