Import multiple files

Hello all ,

I have couple of .xpt files that I am trying to import into my R data directory package folder
I am getting the List of all the files ( by doing below ) . I am not able to get individual files loaded into /data folder . See below . Please suggest me what is that I am missing

Following the example available at

this SAVE and LOAD are creating one big file instead of Individual files

save it to the folder with your custom functions


load it like this whenever you need it in another script with


My Purpose is to
#1 is to read .xpt file
adae <- sasxport.get("adae.xpt")

#2 Copy it to my R- package as .Rda file
usethis:: use_data (adae , compress = "xz" )

#3 Copy it my R- package data-raw/inst/extdata as .csv files

readr::write_csv(adae , path= "inst/extdata/adae.csv")

There are good number of datasets , so want to repeat this reading and saving process

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.