trashbirdecology / bbsAssistant

An R package for downloading and handling data and information from the North American Breeding Bird Survey.
Creative Commons Zero v1.0 Universal
27 stars 13 forks source link

Error #41

Closed GabsPalomo closed 4 years ago

GabsPalomo commented 5 years ago

I get this warning when running this code. I understand that the file got saved but I was wondering if we could rewrite the warning to something that won't scare or alarm the users. I post the original warning and my suggestion below. In my experience, R users don't always understand errors so I'm always keen on providing more info on the errors as possible so that people may be less freaked out about them. It may be a silly suggestion though. Just a thought.

Original warning (as it is now)

export_bbsFeathers(dataIn = flBBS, newDir = bbsDir, filename = regionFileName.use) Warning message: In dir.create(newDir) : 'G:\bbsAssistant package\BBS_test_GP\bbsData' already exists

My suggested warning Warning message: In dir.create(newDir) : 'G:\bbsAssistant package\BBS_test_GP\bbsData' already exists. Make sure the new file was saved in this directory: e.g., "Florida.feather"

trashbirdecology commented 5 years ago

This can be done by wrapping dir.create() inside suppressWarnings().

This will have to be done for a few functions.

Please feel free to address it and reference this Issue.

GabsPalomo commented 5 years ago

I like the warning, I just meant rewriting the warning message.

trashbirdecology commented 5 years ago

Great! Please feel free to update the message warning in the source code.