Skip to content

str() method for FBMs #194

@privefl

Description

@privefl

The problem

library(bigstatsr)
X <- big_attachExtdata()
X$backingfile
str(X)
Sys.chmod(X$backingfile, mode = "0444")
str(X)
X$is_read_only <- TRUE
str(X)

One starting point:

str.FBM <- function(object, ...) {
  cat("An object of class", class(object), "\n")
  cat(" - Dimensions:", paste(dim(object), collapse = " x "), "\n")
  cat(" - Backing file:", object$backingfile, "\n")
  cat(" - Writable:", if (file.access(object$backingfile, 2) == 0) "Yes" else "No", "\n")
}

PS; Should make look at is_read_only and file.access.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions