scat | R Documentation |
Function for making clean, good looking scatter plots with the option to add marginal denisty or box plots.
scat(data, x, y, group = NULL, marg = "none", line = "none", se = FALSE)
data |
the data as a data frame |
x |
a string naming the variable from |
y |
a string naming the variable from |
group |
a string naming the variable from |
marg |
|
line |
|
se |
|
A results object containing:
results$scat | a scatter plot | ||||
set.seed(1337) X <- rnorm(100) Y <- 0.5*X + rnorm(100) dat <- data.frame(X = X, Y = Y) scatr::scat(dat, x = 'X', y = 'Y', line = 'linear', se = TRUE, marg = 'dens')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.