I am having difficulty with one step in my code to read in a folder of text files and convert it to a dtm. The problem is that, for some reason, my computer is only able to int
List.files
only gives you the file names, not file names with full path. Try
files <- as.character(list.files(path="[file path]"))
readLines(paste("[file path]",.Platform$file.sep,files[1],sep=""))
directory <- "C://temp" ## for example
filenames <- list.files(directory, pattern = "*.*", full.names = TRUE)