report_xray: Create X-ray report

View source: R/report_xray.R

report_xrayR Documentation

Create X-ray report

Description

Create X-ray report

Usage

report_xray(data, by = NULL, data_name, study, loc = NULL)

Arguments

data

A data frame.

by

Optional name of grouping ("by") variable as character string.

data_name

Name of dataset to be displayed in report as character string.

study

Name of study to be displayed in report as character string.

loc

Directory to save the rmd and html output. Defaults to current working directory.

Examples


## Not run: 

diamonds <- ggplot2::diamonds %>% 
 mutate(price = structure(price, label = 'price in US dollars'),
        carat = structure(carat, label = 'weight of the diamond'),
        cut = structure(cut, label = 'quality of the cut (Fair, Good, Very Good, Premium, Ideal)'),
        color = structure(color, label = 'diamond colour, from D (best) to J (worst)'),
        clarity = structure(clarity, label = 'a measurement of how clear the diamond is (I1 (worst), SI2, SI1, VS2, VS1, VVS2, VVS1, IF (best))'),
        x = structure(x, label = 'length in mm'),
        y = structure(y, label = 'width in mm'),
        z = structure(z, label = 'depth in mm'),
        depth = structure(depth, label = 'total depth percentage = z / mean(x, y) = 2 * z / (x + y)'),
        table = structure(table, label = 'width of top of diamond relative to widest point'))
        
diamonds %>% 
 report_xray(data_name = 'Diamonds', study = 'ggplot2', loc = getwd())
 
diamonds %>% 
 report_xray(data_name = 'Diamonds', by = 'cut', study = 'ggplot2', loc = getwd())


## End(Not run)


agstn/dataxray documentation built on Oct. 16, 2023, 11:16 p.m.