Skip to content

Feature request: more lenient check_nondata_cols #3835

@teunbrand

Description

@teunbrand

Currently data.frame columns are dropped when they don't satisfy the checks of check_nondata_cols which looks like the following:

check_nondata_cols <- function(x) {
  idx <- (vapply(x, function(x) is.null(x) || rlang::is_vector(x), logical(1)))
  names(x)[which(!idx)]
}

The reason I would like it to be more lenient is such that vector-like columns which technically aren't vectors could be accepted, specifically for the virtual S4Vectors::Vector-class (and non-virtual classes containing this). This would open up channels to have Bioconductor work with ggplot2 more naturally, provided some extra infrastructure is implemented at the scale/coordinate level (which could befit a ggplot extention package).

I would propose to change check_nondata_cols to the following:

check_nondata_cols <- function(x) {
  idx <- (vapply(x, function(x) is.null(x) || rlang::is_vector(x) || inherits(x, "Vector"), logical(1)))
  names(x)[which(!idx)]
}

Thanks you for reading and considering!

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