inst/doc/feature_columns.R

## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, eval = FALSE)

## -----------------------------------------------------------------------------
# library(nycflights13)
# print(flights)

## -----------------------------------------------------------------------------
# cols <- feature_columns(
#   column_numeric("dep_time"),
#   column_numeric("dep_delay")
# )

## -----------------------------------------------------------------------------
# cols <- feature_columns(
#   column_numeric("dep_time", "dep_delay")
# )

## -----------------------------------------------------------------------------
# library(nycflights13)
# 
# cols <- feature_columns(names = flights,
#   column_numeric(ends_with("time"))
# )

## -----------------------------------------------------------------------------
# cols <- with_columns(flights, {
#   feature_columns(
#     column_numeric(ends_with("time"))
#   )
# })

## -----------------------------------------------------------------------------
# cols <- with_columns(flights, {
#   feature_columns(
#     ends_with("time") ~ column_numeric(),
#   )
# })

Try the tfestimators package in your browser

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

tfestimators documentation built on Aug. 19, 2025, 1:15 a.m.