Skip to content

paste_linter should not warn inside expression() in a plot #2945

@mcol

Description

@mcol

This suggestion is actually misleading, as only paste() and not paste0() is allowed when expression() is used within a plot, such as to generate title or axis labels:

warning: [paste_linter] paste0(...) is better than paste(..., sep = "").
      main = expression(paste("Plateau test ", L[n], ",", L[x], " curves", sep =
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The rationale is that only a certain number of functions and operators are valid inside expression():
https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/plotmath.html

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