frictionlessdata / datapackage-r

An R package for working with Data Package.
https://frictionlessdata.github.io/datapackage-r/
Other
43 stars 7 forks source link

dataPackage$save() requires creating a directory #12

Closed HeidiSeibold closed 5 years ago

HeidiSeibold commented 6 years ago

I run into another error when running the vignette example:

> dataPackage$save('example_data')
Error in file(con, "w") : cannot open the connection
In addition: Warning message:
In file(con, "w") :
  cannot open file 'example_data/package.json': No such file or directory

when I manually create the folder example_data, it works.

kleanthisk10 commented 6 years ago

The 'example_data' refers to the target folder, where you want to save the datapackage, as it's documented in dataPackage$save

HeidiSeibold commented 6 years ago

I understand. Then I would suggest to either allow for dataPackage$save to create the folder if it doesn't exist or to use dataPackage$save('.') in the vignette so it runs without errors for people who just want to see how it works

kleanthisk10 commented 5 years ago

dataPackage$save updated and you can create a folder if it doesn't exists. dataPackage$save('.') was working and before the update.