I'm importing a bunch of files and trying to read all the characters into one variable. I need the order preserved. I found this code on Stackoverflow that does what I need but it adds the 0 in the front. so instead of the "0" i did
data <- ""
This still leaves my data variable with a blank at the beginning. I cannot subset it and remove all the "" blanks since my inputs have some that need to remain in there. How can I remove just the first blank "" or read all my files without having to add that blank there in the first place.
setwd("C:\\Users\\J\\Desktop\\nlp\\brown")
files <-list.files()
data <- 0
for (f in files) {
tempData = scan( f, what="character")
data <- c(data,tempData)
}