% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io_tablet.R
\name{io_tablet}
\alias{io_tablet}
\title{Import and Export Tablet}
\usage{
io_tablet(x, ...)
}
\arguments{
\item{x}{object}

\item{...}{passed arguments}
}
\value{
See methods.
}
\description{
Imports or exports tablet as comma-separated variable.
Generic, with methods that extend \code{\link[yamlet]{io_csv}}.
}
\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')
}
\seealso{
Other io: 
\code{\link{io_csv.tablet}()},
\code{\link{io_tablet.character}()},
\code{\link{io_tablet.data.frame}()},
\code{\link{io_tablet.tablet}()}
}
\concept{io}
