Skip to content
Back to formatted view

Raw Message

Message-ID: <etPan.5540117a.643c9869.2d6@catherines-MacBook-Pro.local>
Date: 2015-04-28T23:02:18Z
From: catherine peters
Subject: How to solve: error in file(file, "rt") : invalid 'description' argument

Hi thank you in advance for your assistance.?

I am using the following section of script:?

DirPath_folder?
<-Sys.glob(file.path("/Users/catpeters/Documents/R_working_directory/1_Data_MC_Sorted"))?

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

# ## EVERY Control and Impact #?
DirPath_Matrix <-Sys.glob(file.path(DirPath_folder[folder],?
"*Markov_Matrix_Month.txt"))?

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)) {?
setwd("/Users/catpeters/Documents/R_working_directory/1_Data_MC_Sorted")?
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]]