-
Notifications
You must be signed in to change notification settings - Fork 702
/
Copy path054_explore.R
61 lines (43 loc) · 1.05 KB
/
054_explore.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# BUSINESS SCIENCE R TIPS ----
# R-TIP 054 | explore: simplified exploratory data analysis ----
#
# 👉 For Weekly R-Tips, Sign Up Here:
# https://learn.business-science.io/r-tips-newsletter
# Documentation: https://github.com/rolkra/explore
# LIBRARIES ----
library(tidyverse)
library(explore)
# DATA ----
mpg
# EXPLORE ----
# * Shiny App ----
mpg %>% explore()
mpg %>% select(-cty) %>% explore()
# * Describe ----
mpg %>% describe_all()
mpg %>% describe_cat(manufacturer)
# * Explore All Variables ----
mpg %>%
explore_all(
target = hwy,
ncol = 3
)
# * Explore Bivariate Plot ----
mpg %>%
explore(
target = hwy,
var = hwy,
var2 = manufacturer
)
# * Reporting ----
mpg %>%
report(
target = hwy,
output_dir = "054_explore/",
output_file = "explore_plots.html"
)
# LEARNING MORE ----
# - Has your data science progress has stopped?
# FREE MASTERCLASS
# - 10 SECRETS TO BECOMING A DATA SCIENTIST
# https://learn.business-science.io/free-rtrack-masterclass