explore | R Documentation |
Explore a dataset or variable
explore(
data,
var,
var2,
n,
target,
targetpct,
split,
min_val = NA,
max_val = NA,
auto_scale = TRUE,
na = NA,
...
)
data |
A dataset |
var |
A variable |
var2 |
A variable for checking correlation |
n |
A Variable for number of observations (count data) |
target |
Target variable (0/1 or |
targetpct |
Plot variable as target% ( |
split |
Alternative to targetpct (split = !targetpct) |
min_val |
All values < min_val are converted to |
max_val |
All values > max_val are converted to |
auto_scale |
Use 0.2 and 0.98 quantile for |
na |
Value to replace |
... |
Further arguments (like flip = |
Plot object
## Launch Shiny app (in interactive R sessions)
if (interactive()) {
explore(iris)
}
## Explore grafically
# Load library
library(magrittr)
# Explore a variable
iris %>% explore(Species)
iris %>% explore(Sepal.Length)
iris %>% explore(Sepal.Length, min_val = 4, max_val = 7)
# Explore a variable with a target
iris$is_virginica <- ifelse(iris$Species == "virginica", 1, 0)
iris %>% explore(Species, target = is_virginica)
iris %>% explore(Sepal.Length, target = is_virginica)
# Explore correlation between two variables
iris %>% explore(Species, Petal.Length)
iris %>% explore(Sepal.Length, Petal.Length)
# Explore correlation between two variables and split by target
iris %>% explore(Sepal.Length, Petal.Length, target = is_virginica)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.