processing_section <- function(x){
unlist(strsplit(tolower(x), “\\W”))

lf <- list.files(pattern=”.txt”)
lapply(lf, function(path) processing_section(scan(path, what=”character”, sep=”\n”)))

A huge ‘Thank You’ (Merci) to Vincent Bonhomme who helped me with this code: I can now read in any number of pupil text files and have them stripped and ready for processing – frequency analysis, unique word count, etc – by simply indexing the array/table/data frame/list structure.