0

I have created a RQDA project and I want to import 200 files to it.

I am using code adopted from this question which is in line with the usual way in which batch import can be done in RQDA.

library(RQDA)
#import list of files into program
files<-list.files("./InterviewTextFiles/forRQDA/")
openProject("./RQDA/QauliAnalysis.rqda", updateGUI = T) 
write.FileList(files)

According to the answer in the afore mentioned question, the import was failing because every file did not have a unique name. The error I am getting is the same as in the question: NA exists in the database!

I have double checked that my file names are unique. The file naming convention I a following is ID_firstName_lastName_SequenceNo.txt. At least the SequenceNo part of the file name ensures that my file names are unique (because the other parts come from a db that may have some typos). I have run unique(files) and I am getting the names of all 200 files too.

But, I can import individual files using the GUI.

I have also used the answer here to ensure that my file encoding is ANSII.

Where am I going wrong?

DotPi
  • 3,977
  • 6
  • 33
  • 53

1 Answers1

0

Your code was:

library(RQDA)
#import list of files into program
files<-list.files("./InterviewTextFiles/forRQDA/")
openProject("./RQDA/QauliAnalysis.rqda", updateGUI = T) 
write.FileList(files)

'files' is a list with the content, but remember each element has a name.

You got an NA because there are not assigned names to the elements of the list ('names(files)').

Maybe it's better to do everything from the console:

library(RQDA)
RQDA()
#import list of files into program
files<-list.files("./InterviewTextFiles/forRQDA/")
names(files) <- my_filesname
openProject("./RQDA/QauliAnalysis.rqda", updateGUI = TRUE) 
write.FileList(files)
closeProject()
Colibri
  • 682
  • 6
  • 8