[R] How to solve: error in file(file, "rt") : invalid 'description' argument

catherine peters catherine.h.peters at googlemail.com
Wed Apr 29 01:02:18 CEST 2015

Hi thank you in advance for your assistance. 

I am using the following section of script: 


for (folder in 1: length(DirPath_folder)) { 

# ## EVERY Control and Impact # 
DirPath_Matrix <-Sys.glob(file.path(DirPath_folder[folder], 

data <- read.table(DirPath_Matrix, header = TRUE, sep = ";") 

if (folder ==1) { DATA_ALL1 <- data } else { DATA_ALL1 <- rbind(DATA_ALL1, 
data) } 

if (folder == length(DirPath_folder)) { 
write.table(DATA_ALL1 ,"Matrix_Markov_ALL_MONTH_RB.txt" , col.names=TRUE, 
row.names=FALSE, sep=";") write.table(DATA_ALL1 
,"Matrix_Markov_ALL_MONTH_RB.csv" , col.names=TRUE, row.names=FALSE, 
sep=";") } } 

There seems to be a problem with: data <- read.table(DirPath_Matrix, header 
= TRUE, sep = ";"). When run it returns the Error in file(file, "rt") : 
invalid 'description' argument. This has worked previously and I'm not sure 
where the error is. 

Thanks again 
	[[alternative HTML version deleted]]

More information about the R-help mailing list