loading datasets during `run_examples()`

25 views
Skip to first unread message

William Beasley

unread,
Jan 28, 2013, 10:36:59 PM1/28/13
to rdev...@googlegroups.com
I think this issue reflects a problem with my understanding of devtools, but it's possible it's my understanding with r2oxygen.

When I run `devtools::run_examples()`, it throws an error when the example includes a data.frame that I haven't loaded explicitly with `data()`.  I've set LazyData to TRUE in the DESCRIPTION file (https://github.com/wibeasley/NlsyLinksStaging/blob/3e8436efe5c96ddf2d1f607996fd3091c9c390c6/NlsyLinks/DESCRIPTION#L25)

Unexpectedly to me, the error isn't thrown when I run `devtools::check()` or click RStudio's check button. When I reverted back to devtools 0.8, the same behavior existed, so it's not an issue with devtools 1.0.

There are two ways I can avoid the problem with `devtools::run_examples()`:

2) Append `exportPattern("^[[:alpha:]]+")` to the NAMESPACE file created by `devtools::document(roclets = c("collate", "namespace","rd") )`

I'd like to learn what specific object(s) need to be added to the existing NAMESPACE file (https://github.com/wibeasley/NlsyLinksStaging/blob/3e8436efe5c96ddf2d1f607996fd3091c9c390c6/NlsyLinks/NAMESPACE), and what I need to do improve my roxygen2 comments.

Also, I'm curious why `devtools::run_examples()` returns an error, but `devtools::check()` does not?

Thanks, Will

Hadley Wickham

unread,
Jan 30, 2013, 2:41:42 PM1/30/13
to William Beasley, rdev...@googlegroups.com
I'd say that's a devtools bug - can you please file at
https://github.com/hadley/devtools/issues?

Thanks!

Hadley
> --
> You received this message because you are subscribed to the Google Groups
> "devtools" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rdevtools+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Chief Scientist, RStudio
http://had.co.nz/

William Beasley

unread,
Jan 30, 2013, 4:05:57 PM1/30/13
to rdev...@googlegroups.com, William Beasley
Reply all
Reply to author
Forward
0 new messages