Type: | Package |
Title: | Create Scatter Plots with Marginal Density or Box Plots |
Version: | 1.0.1 |
Date: | 2017-12-01 |
Author: | Ravi Selker |
Maintainer: | Ravi Selker <selker.ravi@gmail.com> |
Description: | Allows you to make clean, good-looking scatter plots with the option to easily add marginal density or box plots on the axes. It is also available as a module for 'jamovi' (see https://www.jamovi.org for more information). 'Scatr' is based on the 'cowplot' package by Claus O. Wilke and the 'ggplot2' package by Hadley Wickham. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
LazyData: | true |
Depends: | R (≥ 3.2) |
Imports: | jmvcore (≥ 0.8.0), R6, ggplot2, cowplot, ggstance, ggridges |
RoxygenNote: | 6.0.1 |
URL: | https://github.com/raviselker/scatr |
BugReports: | https://github.com/raviselker/scatr/issues |
NeedsCompilation: | no |
Packaged: | 2017-12-04 13:52:49 UTC; ravi |
Repository: | CRAN |
Date/Publication: | 2017-12-05 09:47:24 UTC |
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')