Skip to content

R CMD check warning with replacement method #569

@hadley

Description

@hadley

In tidyverse/stringr#578, which contains:

#' @export
method(`[<-`, stringr_view) <- function(x, i, ..., value) {
  data <- S7_data(x)
  data[i, ...] <- value

  stringr_view(data, id = x@id)
}

I see:

W  checking replacement functions ...
   Error in get(f, envir = code_env) : invalid first argument
   Calls: <Anonymous> -> Filter -> unlist -> lapply -> FUN -> get
   Execution halted
   The argument of a replacement function which corresponds to the right
   hand side must be named ‘value’.

Removing the ... didn't make the problem go away, so I'm a bit mystified by the error. It's possibly a bug in R CMD check?

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