report_xray | R Documentation |
Create X-ray report
report_xray(data, by = NULL, data_name, study, loc = NULL)
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. |
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.