tests/testthat/helper-data.R

data("mtcars")
data("state")

DT <- data.table::as.data.table(mtcars)

state <- data.table::data.table(
    region = state.region,
    division = state.division,
    name = state.name,
    abb = state.abb,
    center_x = state.center$x,
    center_y = state.center$y,
    population = state.x77[, 1L],
    income = state.x77[, 2L],
    area = state.x77[, 8L],
    key = c("region", "division")
)

Try the table.express package in your browser

Any scripts or data that you put into this service are public.

table.express documentation built on April 3, 2023, 5:43 p.m.