We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, if I run
reprex::reprex({x <- rnorm(100) ; mean(x)}, venue = 'gh', show = FALSE)
I get the code for
x <- rnorm(100) mean(x) #> [1] 0.06771625
which is wonderful! However, changing the comment character, e.g. to ## is more complicated, requiring (as suggested on Twitter) copying
##
#+ include=FALSE knitr::opts_chunk$set(comment = '##') #+ realstuff x <- rnorm(100) mean(x)
and then calling reprex::reprex() to get the code for
reprex::reprex()
x <- rnorm(100) mean(x) ## [1] 0.04698201
To make this process simpler, could we get a comment character parameter in reprex akin to formatR::tidy_eval's prefix?
reprex
formatR::tidy_eval
prefix
The text was updated successfully, but these errors were encountered:
974a9ab
OK you can do this now like so:
reprex::reprex({x <- rnorm(100) ; mean(x)}, venue = 'gh', opts_chunk = list(comment = '##'))
That generates this:
x <- rnorm(100) ; mean(x) ## [1] -0.04785671
This can be used to provide general knitr chunk and package options and, in particular, the one you wanted to modify.
Sorry, something went wrong.
Dignify knitr option comment with its own arg
comment
68f70ec
Relates to #33
No branches or pull requests
Currently, if I run
I get the code for
which is wonderful! However, changing the comment character, e.g. to
##
is more complicated, requiring (as suggested on Twitter) copyingand then calling
reprex::reprex()
to get the code forTo make this process simpler, could we get a comment character parameter in
reprex
akin toformatR::tidy_eval
'sprefix
?The text was updated successfully, but these errors were encountered: