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

@example[s]: Import example script inside \dontnn{...} #1010

Closed
HenrikBengtsson opened this issue Dec 14, 2019 · 1 comment
Closed

@example[s]: Import example script inside \dontnn{...} #1010

HenrikBengtsson opened this issue Dec 14, 2019 · 1 comment

Comments

@HenrikBengtsson
Copy link
Contributor

HenrikBengtsson commented Dec 14, 2019

This is the same feature request as #687, which was meant to be fixed by #868. Unfortunately, I think it's still not possible to achieve this. I'd like to do:

For example,

#' @examples \dontrun{
#' @example incl/foo-ex.R
#' @examples }

The @examples statements are ignored with a warning because they are "incomplete". Here is a simpler example:

#' @examples \dontrun{
#' @examples  1+2
#' @examples }

that produce:

Warning: [foo.R:17] @examples mismatched braces or quotes
Warning: [foo.R:19] @examples mismatched braces or quotes

and the produced Rd file contains only:

\examples{
 1+2
}
@hadley
Copy link
Member

hadley commented Mar 5, 2020

I think #962 is probably a better approach to solving this problem.

@hadley hadley closed this as completed Mar 5, 2020
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