io_tablet: Import and Export Tablet

View source: R/io_tablet.R

io_tabletR Documentation

Import and Export Tablet

Description

Imports or exports tablet as comma-separated variable. Generic, with methods that extend io_csv.

Usage

io_tablet(x, ...)

Arguments

x

object

...

passed arguments

Value

See methods.

See Also

Other io: io_csv.tablet(), io_tablet.character(), io_tablet.data.frame(), io_tablet.tablet()

Examples

library(yamlet)
library(boot)
library(dplyr)
library(magrittr)
library(tablet)
library(kableExtra)
melanoma %<>% redecorate('
time: [ Time, day ]
status: [ Patient Status, [ Died^1: 1, Alive^2: 2, Unrelated: 3 ]]
sex: [ Sex^3, [ Male: 1, Female^4: 0 ]]
age: [ Age, year ]
year: [ Year of Operation ]
ulcer: [ Ulceration, [ Present: 1, Absent: 0 ]]
thickness: [ Tumor Thickness, mm ]
')
tbl <- melanoma %>%
  select(-time, -year) %>%
  group_by(status, ulcer) %>%
  enscript %>%
  tablet(Missing~NULL)
path <- tbl %>% io_tablet(tempfile(fileext = '.csv'))
# alternatively:
path <- tbl %>% io_csv(tempfile(fileext = '.csv'))
tab <- path %>% io_tablet

tbl %>% 
kbl(booktabs = TRUE) %>%
kable_styling(latex_options = 'scale_down')

tab %>% 
kbl(booktabs = TRUE) %>%
kable_styling(latex_options = 'scale_down')

tablet documentation built on July 19, 2026, 9:06 a.m.