Learn R Programming

rENA (version 0.3.0)

as.qe.data: Convert an object to 'qe.data' class

Description

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)

Value

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

Arguments

x

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

Examples

Run this code
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

Run the code above in your browser using DataLab