kenhanscombe / ukbtools

An R package to manipulate and explore UK Biobank data
https://kenhanscombe.github.io/ukbtools/
96 stars 26 forks source link

- change .update_tab_path to be relative if path = "." for ukb_df #8

Closed muschellij2 closed 6 years ago

muschellij2 commented 6 years ago

In .update_tab_path (see https://github.com/kenhanscombe/ukbtools/compare/master...muschellij2:master#diff-a2fd55d43d2ab8edef24e51768910caeL209), if the path is set using getwd(), then this script will fail in the future run if the files are moved. Without adding in getwd(), then this script should work in the future.

kenhanscombe commented 6 years ago

Would it fail? I thought it would pick up the current directory on any re-run.

You're right though; getwd() is not needed. I've dropped the if construct altogether and pasted path (default path = ".") and file name.

Thanks for picking that up.