write.FileList.rd
If importing a single file to the project, you can do it by clicking import button in the Files Tab.
Sometimes, you want to import a batch of files quickly, you can do it by command. write.FileList
can
be used to import a batch of files into the source table in the *.rqda file. addFilesFromDir
can add
all files from a directory into *.rqda.
write.FileList(FileList, encoding = .rqda$encoding, con = .rqda$qdacon, ...) addFilesFromDir(dir, pattern = "*.txt$")
FileList | A list. Each element of the list is the file content, and the |
---|---|
encoding | Don't change this argument. |
con | Don't change this argument. |
dir | Path of a directory where plain files are located. |
pattern | Argument passed to |
... |
|
The file content will be converted to UTF-8 character before being written to
*.rqda. The original content can be in any suitable encoding, so you
can inspect the content correctly; In other words,the better
practices is to used the corresponding encoding (you can get a hint by
localeToCharset
function) to save the imported
files.
This function is used for the side-effects. No value is return.
Huang Ronggui
if (FALSE) { Files <- list("File name one"="content of first File.", "File name two"="content of the second File.") write.FileList(Files) ## Please launch RQDA(), and open a project first. }