1

I'm trying to create a list of all my transcriptions that I would like to run text mining analyses on.

I'm using qdap to read in the transcriptions using the code below:

read.transcript(transcript1_filename,col.names = c("Person","Dialogue"),skip = 5)

This produces a data frame with two columns, one identifying the speaker and the other a strings of dialogue.

I have a lot of transcriptions so want to create a list to run further analyses on.

I've tried using lapply as so:

transcript_files = list.files("~/Transcripts",full.names = TRUE)
my_list = list()
my_list= lapply(transcript_files,read.transcript(),col.names = c("Person","Dialogue"),skip = 5)

But this produces the following error:

Error in regexpr("\\.([[:alnum:]]+)$", x) : argument "file" is missing, with no default

I have also tried a for loop as so:

for(i in length(transcript_files)){
my_list[[i]] = read.transcript(transcript_files[i],col.names = c("Person","Dialogue"),skip = 5)
}

But for some reason this only reads in the last file, all other entries in the list are NULL.

No idea what is going wrong here.

Gerard
  • 159
  • 1
  • 2
  • 11

0 Answers0