Skip to content

last2() doesn't handle missings in y #303

@hadley

Description

@hadley

Maybe should be more like this?

last2 <- function (x, y) {
  miss <- is.na(x) | is.na(y)
  x <- x[!miss]
  y <- y[!miss]
  y[order(x)][length(y)]
}

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