Skip to content

scales::dollar places $ before negative sign in RMarkdown inline code #216

@k5cents

Description

@k5cents

I often use scales::percent() and scales::dollar() inside inline RMarkdown code. I know this package was created for ggplot2 plots, but this use case is really handy.

As of now, using the later on negative values (i.e., scales::dollar(-200)) places the $ symbol before the negative symbol.

library(scales)
scales::dollar(-200)
#> [1] "$-200"

Created on 2019-07-15 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions