I am trying to combine a series of character lists into one single file, but can't figure out how to do it. I explain my code below:
Maybe this a question under the theme of combine character lists. Unfortunately, I still did not know how to do this. Your help will be highly appreciated.
num = c(1:5)
aa = paste0(names, "class.", num) ##read all 5 files, naming class.1, etc
aa = sapply(aa, scan, what = "character", quiet = T) ## scaning them into one list
class(aa) # its class is list
class(aa[[1]]) # this time, the class is character
## I tried to combine aa into one single file in the following step,
## but it did not work well. Maybe a single file is not accurate,
##but I hope this ‘file’ has the length of the sum of all above 5 files.
all = rbind(aa, deparse.level = 0)
## it gives the exactly same result as aa gives. The length of all is equal to 5