I would like to open an Excel file in directory "dld" that starts with "RPT". I've tried the below, but I keep getting an error:
Error in file(file, "rt") : invalid 'description' argument
I'm guessing it has something to do with the code coming from a read.csv and I'm trying to adapt it to read.table.
dld <- "C:/Users/Me/Downloads/"
filename <- paste(dld, "RPT_", sep = "")
file <- read.table(dir(dirname(filename), full.names=T, pattern=paste("^", basename(filename), sep="")))
Ideas? Any direction/help would be greatly appreciated.