Skip to contents

This function converts an object to the 'qe.data' class. If the object is not a data.frame or matrix, it is first converted to a data.table.

Usage

as.qe.data(x)

Arguments

x

An object. The object to be converted to 'qe.data' class.

Value

The modified object with the 'qe.data' class.

Examples

library(data.table)

dt <- data.table(
  ID = 1:5,
  Name = c("Alice", "Bob", "Charlie", "David", "Eve"),
  Age = c(25, 30, 35, 40, 45),
  Score = c(85, 90, 95, 80, 75)
)
dt <- as.qe.data(dt);
class(dt) # Should show 'qe.data' along with other classes
#> [1] "qe.data"    "data.table" "data.frame"