Analisis Data Eksploratori dengan R
Andrew Bray
Assistant Professor, Reed College
ggplot(cars, aes(x = hwy_mpg)) +
geom_histogram()
`stat_bin()` menggunakan `bins = 30`. Pilih nilai yang lebih baik dengan `binwidth`.
Pesan peringatan:
14 baris dihapus karena nilai non-finit (stat_bin).

ggplot(cars, aes(x = hwy_mpg)) +
geom_histogram() +
facet_wrap(~pickup)
`stat_bin()` menggunakan `bins = 30`. Pilih nilai yang lebih baik dengan `binwidth`.
Pesan peringatan:
14 baris dihapus karena nilai non-finit (stat_bin).

cars2 <- cars %>%
filter(eng_size < 2.0)
ggplot(cars2, aes(x = hwy_mpg)) +
geom_histogram()
cars %>%
filter(eng_size < 2.0) %>%
ggplot(aes(x = hwy_mpg)) +
geom_histogram()
cars %>%
filter(eng_size < 2.0) %>%
ggplot(aes(x = hwy_mpg)) +
geom_histogram()
`stat_bin()` menggunakan `bins = 30`. Pilih nilai yang lebih baik dengan `binwidth`.

cars %>%
filter(eng_size < 2.0) %>%
ggplot(aes(x = hwy_mpg)) +
geom_histogram(binwidth = 5)

cars %>%
filter(eng_size < 2.0) %>%
ggplot(aes(x = hwy_mpg)) +
geom_density()

cars %>%
filter(eng_size < 2.0) %>%
ggplot(aes(x = hwy_mpg)) +
geom_density(bw = 5)

Analisis Data Eksploratori dengan R