Re: [R] Making objects global in a package

2018-07-16 Thread Michael Hannon
Thanks to all for your replies. So far as I can see, there was nothing wrong with my original approach, but I've decided to stuff all the relevant definitions into a function (or functions), as this seems to make "devtools::check()" happier. -- Mike On Fri, Jul 13, 2018 at 6:54 PM, Jeff Newmill

Re: [R] Making objects global in a package

2018-07-13 Thread Jeff Newmiller
Avoiding rda files because they don't track well with version control seems weak to me, since you should be creating the rda with an R file in the tools directory. On July 13, 2018 6:50:31 PM PDT, William Dunlap wrote: >What the OP is doing looks fine to me. > >The environment holding the data

Re: [R] Making objects global in a package

2018-07-13 Thread William Dunlap via R-help
What the OP is doing looks fine to me. The environment holding the data vectors is not necessary, but it helps organize things - you know where to look for this sort of data vector. I would avoid the *.rda file, since it is not text, hence not readily editable or trackable with most source contro

Re: [R] Making objects global in a package

2018-07-13 Thread Jeff Newmiller
a) There is a mailing list for package development questions: R-package-devel. b) This seems like a job for the sysdata.rda file... no explicit environments needed. See the Writing R Extensions manual. On July 13, 2018 5:51:06 PM PDT, Michael Hannon wrote: >Greetings. I'm putting together a s

Re: [R] Making objects global in a package

2018-07-13 Thread R. Mark Sharp via R-help
I would usually use a function for this. It may not be more R like, but it is more readable to me. If you want, to keep the columns in a file, you could have the function initialize itself on the first call. Mark R. Mark Sharp, Ph.D. Data Scientist and Biomedical Statistical Consultant 7526 Mea