Create dataset in r code

Options
Von1974
Von1974 Registered Posts: 11 ✭✭✭✭

Hi

I have a webapp in Shiny and i would like users to be able to press a button that then create a copy of a dataset that is suffixed with their user name. See code below;

user <- Sys.getenv("USER")dfRules_live <- dkuReadDataset("Rules")dkuWriteDatasetSchema(dfRules_live , paste0("Rules_",user))

However, the error tells me that "Warning: Error in dkuWriteDatasetSchema: Failed to write dataset: dataset does not exist"

I know in a workflow i have to create an empty dataset to populate, but how do i do this in r code?

TIA!

Tagged:

Answers

Setup Info
    Tags
      Help me…