Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

transportability of code #86

Open
kellijohnson-NOAA opened this issue Oct 3, 2017 · 2 comments
Open

transportability of code #86

kellijohnson-NOAA opened this issue Oct 3, 2017 · 2 comments

Comments

@kellijohnson-NOAA
Copy link

Minor issue I am dealing with when trying to recreate the pressure layers from raw data. I first download the data from the original sources (thank you very much for providing links to those). Then, I changed the working directories in your code to my local machine. Subsequently, all calls using substr do not work because my working directory, which influences the full file path, is different. I have changed the code on my local machine to use gsub("\\.[a-z]{3}", "", sapply(strsplit(x, "-|_"), tail, 1)), which will work for some of the uses of substr to pull out the year.

@jamiecmontgomery
Copy link
Contributor

Thanks @kellijohnson for pointing that out. It's true I've hardcoded most of those substr() functions which would throw errors on other machines. As I update the code I'll make sure to change those and thanks for sharing your fix.

@kellijohnson-NOAA
Copy link
Author

No problem. I also came across an issue with stack because of the order in which I loaded packages, so raster::stack works better for me and may lead to increased robustness for others as well.

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

No branches or pull requests

2 participants