Error in read.table no lines available in input

Hello all,
I admit to having no experience with R, but I am attempting to help my wife troubleshoot her system. Cast a wide net and all that.
Here is the particular error that she is receiving:

data<-read.table("c:/users/jacqu/OneDrive/Desktop/ESA/ESA.train.dat", row.names=1, header=T)
Error in read.table("c:/users/jacqu/OneDrive/Desktop/ESA/ESA.train.dat", :
no lines available in input
In addition: warning message:
In read.table("c:/users/jacqu/OneDrive/Desktop/ESA/ESA.train.dat", :
incomplete final line found by readTableHeader on 'c:users/jacqu/OneDrive/Desktop/ESA/ESA.train.dat'
data<-data[,-3]
Error in data[,-3] : object of type 'closure' is not subsettable
str(data)
function (..., list = character (), package = NULL, lib.loc = NULL,
verbose - getOption("verbose"), envir = .GlobalEnv, overwrite = True)
mh<-mahalanobis(filters, center=TRUE, cov(filters, tol=1e-40
Error in mahalanobis(filters, center = TRUE, cov(filters, to = 1e-40 :
object 'filters' not found
mh
Error : object 'mh' not found

She is running 4.1.1 for R and 2021.09.0351 for R Studio

Any help is appreciated.

Welcome.

Is there an error in the file?

To see if there is any text type information readable from ESA.train.dat,
instead of using read.table on it, try readLines on it...

readLines(file(""c:/users/jacqu/OneDrive/Desktop/ESA/ESA.train.dat""),n=3)
1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.