Skip to content

Add comment character parameter #33

@alistaire47

Description

@alistaire47

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

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions