scat {scatr} | R Documentation |
Scatterplot
Description
Function for making clean, good looking scatter plots with the option to add marginal denisty or box plots.
Usage
scat(data, x, y, group = NULL, marg = "none", line = "none", se = FALSE)
Arguments
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 |
|
Value
A results object containing:
results$scat | a scatter plot | ||||
Examples
set.seed(1337)
X <- rnorm(100)
Y <- 0.5*X + rnorm(100)
dat <- data.frame(X = X, Y = Y)
scat(dat, x = 'X', y = 'Y', line = 'linear', se = TRUE, marg = 'dens')