data_file <- tempfile(fileext = ".csv")
meta_file <- tempfile(fileext = ".csv")
data_in <- data.frame(
x1 = c(1.1, 2.2, 3.3),
x2 = c(4.4, 5.5, 6.6),
row.names = c("s1", "s2", "s3")
)
metadata_in <- data.frame(
class = c("A", "B", "A"),
row.names = c("s1", "s2", "s3")
)
utils::write.csv(data_in, data_file)
utils::write.csv(metadata_in, meta_file)
dataset <- read_dataset_csv(
filename.data = data_file,
filename.meta = meta_file,
format = "row",
header.row = TRUE,
header.row.meta = TRUE
)
class(dataset)
Run the code above in your browser using DataLab