knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  echo = FALSE
)
library(daiquiri)
raw_data <- read_data(
  system.file("extdata", "example_prescriptions.csv",
              package = "daiquiri"),
  show_progress = FALSE
)

fts <- field_types(
  PrescriptionID = ft_uniqueidentifier(),
  PrescriptionDate = ft_timepoint(),
  AdmissionDate = ft_datetime(includes_time = FALSE, na = "1800-01-01"),
  Drug = ft_freetext(),
  Dose = ft_numeric(),
  DoseUnit = ft_categorical(),
  PatientID = ft_ignore(),
  Location = ft_categorical(aggregate_by_each_category = TRUE)
)

daiqobj <- daiquiri_report(raw_data,
                                                    field_types = fts,
                                                    dataset_description = "Example prescription data",
                                                    save_directory = "../../docs/articles",
                                                    save_filename = "example_prescriptions",
                                                    show_progress = FALSE)

```{css hide-header-logo, echo=FALSE} img.logo { display: none; }

```{=html}
<iframe src="https://ropensci.github.io/daiquiri/articles/example_prescriptions.html" width="100%" height="900">
</iframe>


phuongquan/daiquiri documentation built on April 5, 2024, 10:36 a.m.