I would like to output tidytable objects to the console in data.table format. Below is a sample code.
d <- iris
library(tidyverse)
library(tidytable)
# I would like to print the output this way (top 5 rows and bottom 5 rows)
# -------------------------------------------------------
iris %>% as.data.table()
# tidytable way (same as tibble, top 10 rows)
# -------------------------------------------------------
iris %>% as_tidytable()
I would appreciate it if someone could tell me the way if any.
Printing like a tibble is the intended way for tidytables to be printed. If you want to print like a data.table you can use as.data.table() like you showed in your example code.
I would like to output tidytable objects to the console in data.table format. Below is a sample code.
I would appreciate it if someone could tell me the way if any.