Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix download_all_icd_data problems #191

Closed
wants to merge 4 commits into from

Conversation

patrickmdnet
Copy link
Collaborator

This pull includes almost everything I needed to fix to get download_all_icd_data() to work properly on a Windows 10 system.

The last fix is that in order for data-raw to work as expected (where .download_to_data_raw will dump into the package directory), the data-raw directory needs to be moved to be under inst. See the chapter in R Packages..

Fixes:

On Windows, the following errors are reported due to trying to save the file "WHO.2016.en.JsonGetRootConcepts?useHtml=false.json".  The ? is not a valid character on Windows.

````
Getting WHO data with JSON: https://icd.who.int/browse10/2016/en/JsonGetRootConcepts?useHtml=false
Saving memoised data for  2016 en JsonGetRootConcepts?useHtml=false in C:\Users\user\AppData\Local\icd\icd/memoise/WHO.2016.en.JsonGetRootConcepts?useHtml=false.json
Error in gzfile(file, mode) : cannot open the connection
In addition: Warning message:
In gzfile(file, mode) :
  cannot open compressed file 'C:\Users\user\AppData\Local\icd\icd/memoise/WHO.2016.en.JsonGetRootConcepts?useHtml=false.json', probable reason 'Invalid argument'
````
On Windows at least (and maybe other OSes) the `data-raw` directory is not included in the package unless it is moved into the `inst` directory.
icd10be files are not included in data-raw so they should be pulled from the cache directory
@patrickmdnet
Copy link
Collaborator Author

Rolled these changes into #192

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant