Skip to content

labs should ignore trailing comma #4237

@bersbersbers

Description

@bersbersbers

Many ggplot2 functions accept (that is, ignore) a trailing comma. A few don't, such as ggplot::labs:

df <- data.frame()
ggplot2::ggplot(
    df,
    ggplot2::aes(
        x = x,
        y = y, # trailing comma
    ), # trailing comma
) +
    ggplot2::labs(
        x = "x",
        y = "y", # no trailing comma allowed. Error: Argument 3 is empty
    ) +
    ggplot2::theme(
        , # trailing comma
    )

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