library(readxl)
KKM94 <- read_excel(path = "KKMsuhartono.xlsx")
KKM94
## # A tibble: 101 x 9
##    Nama          Gender    Nim Fakultas Tempat `Jumlah Kelomp~` `Jumlah Program`
##    <chr>         <chr>   <dbl> <chr>    <chr>             <dbl>            <dbl>
##  1 Erika Putri ~ Putri  1.92e7 SYARI’AH Bumia~                9                5
##  2 Erika Putri ~ Putri  1.92e7 SYARI’AH Bumia~                9                5
##  3 Erika Putri ~ Putri  1.92e7 SYARI’AH Bumia~                9                5
##  4 Erika Putri ~ Putri  1.92e7 SYARI’AH Bumia~                9                5
##  5 Erika Putri ~ Putri  1.92e7 SYARI’AH Bumia~                9                5
##  6 Muhammad Azr~ Putra  1.92e7 ITK      Singo~               14                7
##  7 Muhammad Azr~ Putra  1.92e7 ITK      Singo~               14                7
##  8 Muhammad Azr~ Putra  1.92e7 ITK      Singo~               14                7
##  9 Muhammad Azr~ Putra  1.92e7 ITK      Singo~               14                7
## 10 Muhammad Azr~ Putra  1.92e7 ITK      Singo~               14                7
## # ... with 91 more rows, and 2 more variables: `Nama Program` <chr>,
## #   `Kode Program` <dbl>
library(tidyverse)
## Warning: package 'tidyverse' was built under R version 4.1.2
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5     v purrr   0.3.4
## v tibble  3.1.6     v dplyr   1.0.8
## v tidyr   1.2.0     v stringr 1.4.0
## v readr   2.1.2     v forcats 0.5.1
## Warning: package 'ggplot2' was built under R version 4.1.2
## Warning: package 'tibble' was built under R version 4.1.2
## Warning: package 'tidyr' was built under R version 4.1.2
## Warning: package 'readr' was built under R version 4.1.2
## Warning: package 'dplyr' was built under R version 4.1.2
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
KKM94_gender <- 
  KKM94 %>% 
  count(Gender)

KKM94_gender
## # A tibble: 2 x 2
##   Gender     n
##   <chr>  <int>
## 1 Putra     30
## 2 Putri     71
KKM94_gender <- 
  KKM94 %>% 
  count(Fakultas,Gender)

KKM94_gender
## # A tibble: 6 x 3
##   Fakultas Gender     n
##   <chr>    <chr>  <int>
## 1 ITK      Putra     22
## 2 ITK      Putri     31
## 3 KIK      Putri      9
## 4 SAINTEK  Putri      6
## 5 SYARI’AH Putra      8
## 6 SYARI’AH Putri     25
df_wide <- 
  KKM94 %>% 
  count(Nama, Gender)

df_wide
## # A tibble: 16 x 3
##    Nama                              Gender     n
##    <chr>                             <chr>  <int>
##  1 Asadina Khoirun Nisa              Putri      6
##  2 Dewi Nur Aini                     Putri      4
##  3 Dwi Zumarotul Khasanah            Putri      3
##  4 Erika Putri Septiana              Putri      5
##  5 Fabby ‘Aisyatul Mu’minah Az-zuhri Putri      5
##  6 Harish Nasution                   Putra      8
##  7 Harun Alwan                       Putra      7
##  8 Imana An Nawwara                  Putri      8
##  9 Intan Puspita Sari                Putri      7
## 10 Izzatul Ilmiyah                   Putri      6
## 11 Muhammad Azrul Efendy             Putra      7
## 12 Muhammad Yusuf Ridhofi            Putra      8
## 13 Nur Fauziah Arifiana              Putri      6
## 14 Oktasya Maulidya Syafi’i          Putri      9
## 15 Shinta Ulvitania                  Putri      4
## 16 Zakiyana Afazani Al Maula         Putri      8
table_wide <- 
  df_wide %>% 
  pivot_wider(
    id_cols = Nama,
    names_from = Gender,
    values_from = n
  )

table_wide
## # A tibble: 16 x 3
##    Nama                              Putri Putra
##    <chr>                             <int> <int>
##  1 Asadina Khoirun Nisa                  6    NA
##  2 Dewi Nur Aini                         4    NA
##  3 Dwi Zumarotul Khasanah                3    NA
##  4 Erika Putri Septiana                  5    NA
##  5 Fabby ‘Aisyatul Mu’minah Az-zuhri     5    NA
##  6 Harish Nasution                      NA     8
##  7 Harun Alwan                          NA     7
##  8 Imana An Nawwara                      8    NA
##  9 Intan Puspita Sari                    7    NA
## 10 Izzatul Ilmiyah                       6    NA
## 11 Muhammad Azrul Efendy                NA     7
## 12 Muhammad Yusuf Ridhofi               NA     8
## 13 Nur Fauziah Arifiana                  6    NA
## 14 Oktasya Maulidya Syafi’i              9    NA
## 15 Shinta Ulvitania                      4    NA
## 16 Zakiyana Afazani Al Maula             8    NA
table_wide %>% 
  janitor::adorn_totals(c("row", "col")) %>% # adds row and column totals
  knitr::kable() %>% 
  kableExtra::row_spec(row = 10, bold = TRUE) %>% 
  kableExtra::column_spec(column = 4, bold = TRUE) 
Nama Putri Putra Total
Asadina Khoirun Nisa 6 NA 6
Dewi Nur Aini 4 NA 4
Dwi Zumarotul Khasanah 3 NA 3
Erika Putri Septiana 5 NA 5
Fabby ‘Aisyatul Mu’minah Az-zuhri 5 NA 5
Harish Nasution NA 8 8
Harun Alwan NA 7 7
Imana An Nawwara 8 NA 8
Intan Puspita Sari 7 NA 7
Izzatul Ilmiyah 6 NA 6
Muhammad Azrul Efendy NA 7 7
Muhammad Yusuf Ridhofi NA 8 8
Nur Fauziah Arifiana 6 NA 6
Oktasya Maulidya Syafi’i 9 NA 9
Shinta Ulvitania 4 NA 4
Zakiyana Afazani Al Maula 8 NA 8
Total 71 30 101
# Loading packages
library(ggplot2)
library(dplyr)
   
KKM94 %>% 
  ggplot(mapping = aes(x = Nama, y = `Nama Program`)) + 
  geom_point() + 
  facet_wrap(~ Tempat) +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Program Menurut Tempat", 
         y = "Jumlah Program", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

library(tidyverse)
KKM94 %>% 
  ggplot(aes(Nama,`Jumlah Program`)) +
   geom_line() +
  geom_point() +
  facet_wrap(~ Gender)+
theme(axis.text.x = element_text(angle = -45))

library(tidyverse)
KKM94 %>% 
  ggplot(aes(Nama,`Jumlah Program`)) +
   geom_line() +
  geom_point() +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Program", 
         y = "Jumlah Program", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

library(tidyverse)
KKM94 %>% 
  ggplot(aes(Nama,`Jumlah Kelompok`)) +
   geom_line() +
  geom_point() +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Kelompok", 
         y = "Jumlah Kelompok", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

library(tidyverse)
library(dplyr)
kkmkinerja <- select(KKM94, Nama, Nim, "Jumlah Kelompok", "Jumlah Program")
kkmkinerja
## # A tibble: 101 x 4
##    Nama                       Nim `Jumlah Kelompok` `Jumlah Program`
##    <chr>                    <dbl>             <dbl>            <dbl>
##  1 Erika Putri Septiana  19240072                 9                5
##  2 Erika Putri Septiana  19240072                 9                5
##  3 Erika Putri Septiana  19240072                 9                5
##  4 Erika Putri Septiana  19240072                 9                5
##  5 Erika Putri Septiana  19240072                 9                5
##  6 Muhammad Azrul Efendy 19190006                14                7
##  7 Muhammad Azrul Efendy 19190006                14                7
##  8 Muhammad Azrul Efendy 19190006                14                7
##  9 Muhammad Azrul Efendy 19190006                14                7
## 10 Muhammad Azrul Efendy 19190006                14                7
## # ... with 91 more rows
library(tidyverse)
library(dplyr)
kkmnama <- select(KKM94, one_of("Nama"))
kkmnama
## # A tibble: 101 x 1
##    Nama                 
##    <chr>                
##  1 Erika Putri Septiana 
##  2 Erika Putri Septiana 
##  3 Erika Putri Septiana 
##  4 Erika Putri Septiana 
##  5 Erika Putri Septiana 
##  6 Muhammad Azrul Efendy
##  7 Muhammad Azrul Efendy
##  8 Muhammad Azrul Efendy
##  9 Muhammad Azrul Efendy
## 10 Muhammad Azrul Efendy
## # ... with 91 more rows
qplot(x = KKM94$Nama, y = KKM94$`Jumlah Kelompok`)

qplot(x = KKM94$Nama, y = KKM94$`Jumlah Program`)

require(ggplot2)
g <- ggplot(KKM94, aes(Nama)) 
g <- g + geom_line(aes(y=`Jumlah Kelompok`), colour="red") 
g <- g + geom_line(aes(y=`Jumlah Program`), colour="red") 
g <- g + ylab("Y") + xlab("X")
g

qplot(KKM94$Nama,KKM94$`Jumlah Kelompok`)

qplot(KKM94$Nama,KKM94$`Jumlah Program`,add=TRUE)
## Warning: Ignoring unknown parameters: add

library(ggplot2)
library(reshape2)
## 
## Attaching package: 'reshape2'
## The following object is masked from 'package:tidyr':
## 
##     smiths
x <- KKM94$Nama
`Jumlah Kelompok` <- KKM94$`Jumlah Kelompok`
`Jumlah Program` <- KKM94$`Jumlah Program`
df <- data.frame(x, `Jumlah Kelompok`, `Jumlah Program`)

# melt the data to a long format
df2 <- melt(data = df, id.vars = "x")

# plot, using the aesthetics argument 'colour'
ggplot(data = df2, aes(x = x, y = value, colour = variable))+
  geom_line()+
  geom_point() + 
  theme(legend.justification = "top") +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Perbandingan antara Jumlah Kelompok dan Jumlah Program", 
         y = "Jumlah", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

hist(KKM94$`Jumlah Program`)

hist(KKM94$`Jumlah Kelompok`)

library(ggplot2)
qplot(KKM94$Nama,KKM94$`Nama Program`)+
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa dan Program Kerja", 
         y = "Program Kerja", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

library(ggplot2)
qplot(KKM94$Tempat,KKM94$`Nama Program`)+
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", subtitle = "Tempat KKM dan Program Kerja", y = "Program Kerja", x = "Tempat KKM") +
theme(axis.text.x = element_text(angle = -45))

library(ggplot2)
qplot(KKM94$Gender,KKM94$`Nama Program`)+
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", subtitle = "Gender dan Program Kerja", y = "Program Kerja", x = "Gender") +
theme(axis.text.x = element_text(angle = -45))

# Loading packages
library(ggplot2)
library(dplyr)
   
KKM94 %>% 
  ggplot(mapping = aes(x = Nama, y = `Jumlah Program`)) + 
  geom_point() + 
  facet_wrap(~ Tempat) +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Program Menurut Tempat", 
         y = "Jumlah Program", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

# Loading packages
library(ggplot2)
library(dplyr)
   
KKM94 %>% 
  ggplot(mapping = aes(x = Nama, y = `Jumlah Kelompok`)) + 
  geom_point() + 
  facet_wrap(~ Tempat) +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Kelompok Menurut Tempat", 
         y = "Jumlah Kelompok", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

ggplot(KKM94, aes(`Kode Program`)) + geom_histogram(binwidth = 0.2)+
scale_x_continuous('Kode Program')+
scale_y_continuous('Count')+
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Histogram Program Kerja", 
         y = "Jumlah Program Kerja", x = "Kode Program") +
theme(axis.text.x = element_text(angle = -45))

qplot(`Kode Program`, `Nama Program`, data = KKM94, colour = I("red"))

qplot(`Jumlah Program`, data = KKM94)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(KKM94, aes(`Kode Program`)) +
  geom_histogram(binwidth = 0.1)

ggplot(KKM94, aes(y=`Kode Program`)) +
  geom_histogram(binwidth = 0.1)

ggplot(KKM94, aes(`Kode Program`)) +
  geom_bar() +
  scale_x_binned()

ggplot(KKM94, aes(x=KKM94$`Kode Program`, color=Gender)) +
  geom_histogram(fill="white")+
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Histogram Program Kerja berdasar Gender", 
         y = "Jumlah Program Kerja", x = "Kode Program") +
theme(axis.text.x = element_text(angle = -45))
## Warning: Use of `KKM94$`Kode Program`` is discouraged. Use `Kode Program`
## instead.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(KKM94, aes(x=KKM94$`Kode Program`)) +
  geom_histogram(fill="red")
## Warning: Use of `KKM94$`Kode Program`` is discouraged. Use `Kode Program`
## instead.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(KKM94, aes(x=Nama, y=`Jumlah Program`)) + 
  geom_bar(stat = "identity")+
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Bar Chart Jumlah Program Kerja Terhadap Mahasiswa", 
         y = "Jumlah Program Kerja", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

ggplot(KKM94, aes(x=Nama, y=`Jumlah Program`)) + 
  geom_bar(stat = "identity")+
  coord_flip()+
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Bar Chart Jumlah Program Kerja Terhadap Mahasiswa", 
         y = "Jumlah Program Kerja", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

# Loading packages
library(ggplot2)
library(dplyr)
library(tidyverse)
KKM94 %>% 
  mutate(Tempat = fct_reorder(Tempat, `Jumlah Program`)) %>% 
  ggplot(aes(Tempat, `Jumlah Program`)) +
  geom_boxplot()+
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Box Plot Tempat dengan Jumlah Program", 
         y = "Jumlah Program Kerja", x = "Tempat") +
theme(axis.text.x = element_text(angle = -45))

# Loading packages
library(ggplot2)
library(dplyr)
library(tidyverse)
KKM94 %>% 
  mutate(Tempat = fct_reorder(Tempat, `Jumlah Program`)) %>% 
  ggplot(aes(Tempat, `Jumlah Program`, colour = Gender)) +
  geom_boxplot()+
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Box Plot Tempat dengan Jumlah Program", 
         y = "Jumlah Program Kerja", x = "Tempat") +
theme(axis.text.x = element_text(angle = -45))

# Loading packages
library(ggplot2)
library(dplyr)
library(tidyverse)
KKM94 %>% 
  mutate(Tempat = fct_reorder(Tempat, `Jumlah Program`)) %>% 
  ggplot(aes(Tempat, `Jumlah Program`, colour = Gender)) +
  geom_boxplot()+
  coord_flip() +
labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Box Plot Tempat dengan Jumlah Program", 
         y = "Jumlah Program Kerja", x = "Tempat") +
theme(axis.text.x = element_text(angle = -45))

library(ggplot2)
library(GGally)
## Warning: package 'GGally' was built under R version 4.1.2
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
ggpairs(KKM94, columns = 4:5, ggplot2::aes(colour=Gender))+
theme(axis.text.x = element_text(angle = -45))

library(ggplot2)
library(dplyr)
library(GGally)
ggcorr(KKM94, method = c("everything", "pearson")) 
## Warning in ggcorr(KKM94, method = c("everything", "pearson")): data in column(s)
## 'Nama', 'Gender', 'Fakultas', 'Tempat', 'Nama Program' are not numeric and were
## ignored

library(tidyverse)
KKM94 %>% 
  ggplot(aes(Nama,`Jumlah Kelompok`)) +
   geom_line() +
  geom_point() +
   geom_text(aes(label = Tempat), size = 4) +
  labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Kelompok", 
         y = "Jumlah Kelompok", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

library(tidyverse)
KKM94 %>% 
  ggplot(aes(Nama,`Jumlah Kelompok`)) +
   geom_line() +
  geom_point(aes(color = Gender)) +
   geom_text(aes(label = Tempat), size = 4) +
   labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Kelompok", 
         y = "Jumlah Kelompok", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

library(tidyverse)
KKM94 %>% 
  ggplot(aes(Nama,`Jumlah Kelompok`)) +
   geom_line(colour="red", size=4) +
  geom_point()+
    labs(title = "KKM DR Kelompok 94 UIN Maulana Malik Ibrahim Malang", 
         subtitle = "Nama Mahasiswa Terhadap Jumlah Kelompok", 
         y = "Jumlah Kelompok", x = "Nama Mahasiswa") +
theme(axis.text.x = element_text(angle = -45))

piechart <- function(data, mapping) {
ggplot(data, mapping) +
geom_bar(width = 1) +
coord_polar(theta = "y") +
xlab(NULL) +
ylab(NULL)
}
piechart(KKM94, aes(factor(1), fill = Gender))

piechart <- function(data, mapping) {
ggplot(data, mapping) +
geom_bar(width = 1) +
coord_polar(theta = "y") +
xlab(NULL) +
ylab(NULL)
}
piechart(KKM94, aes(factor(1), fill = Fakultas))

piechart <- function(data, mapping) {
ggplot(data, mapping) +
geom_bar(width = 1) +
coord_polar(theta = "y") +
xlab(NULL) +
ylab(NULL)
}
piechart(KKM94, aes(factor(1), fill = Tempat))

df_wide <- 
  KKM94 %>% 
  count(KKM94$Fakultas, KKM94$Gender)

df_wide
## # A tibble: 6 x 3
##   `KKM94$Fakultas` `KKM94$Gender`     n
##   <chr>            <chr>          <int>
## 1 ITK              Putra             22
## 2 ITK              Putri             31
## 3 KIK              Putri              9
## 4 SAINTEK          Putri              6
## 5 SYARI’AH         Putra              8
## 6 SYARI’AH         Putri             25
df_wide <- 
  KKM94 %>% 
  count(KKM94$`Nama Program`, KKM94$`Kode Program`)

df_wide
## # A tibble: 12 x 3
##    `KKM94$\`Nama Program\`` `KKM94$\`Kode Program\``     n
##    <chr>                                       <dbl> <int>
##  1 Fasilitas Umum                                  7     9
##  2 Hidroponik                                     10     1
##  3 Jamaah Masjid                                   8     4
##  4 Moderasi Beragama                               9     4
##  5 Pemerintahan Desa                               6    14
##  6 Pengolahan Sampah                              12     3
##  7 Posyandu                                        5    16
##  8 Sekolah                                         3    13
##  9 TOGA                                            4    12
## 10 TPQ                                             1    13
## 11 UMKM                                            2     9
## 12 Wisata Lokal                                   11     3
ggplot(KKM94, aes(x = `Jumlah Program`)) + geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(KKM94, aes(x = `Jumlah Kelompok`)) + geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

ggplot(KKM94, aes(x = KKM94$`Kode Program`)) + geom_histogram()
## Warning: Use of `KKM94$`Kode Program`` is discouraged. Use `Kode Program`
## instead.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qplot(x = KKM94$`Jumlah Kelompok`, fill = factor(Tempat),
data = KKM94, geom = c("histogram"))
## Warning: Use of `KKM94$`Jumlah Kelompok`` is discouraged. Use `Jumlah Kelompok`
## instead.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qplot(x = KKM94$`Jumlah Kelompok`, fill = factor(Gender),
data = KKM94, geom = c("histogram"))
## Warning: Use of `KKM94$`Jumlah Kelompok`` is discouraged. Use `Jumlah Kelompok`
## instead.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qplot(x = KKM94$`Jumlah Kelompok`, fill = factor(Fakultas),
data = KKM94, geom = c("histogram"))
## Warning: Use of `KKM94$`Jumlah Kelompok`` is discouraged. Use `Jumlah Kelompok`
## instead.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

qplot(x= KKM94$`Jumlah Kelompok`, fill = Tempat, data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.
## Warning: Use of `KKM94$`Jumlah Kelompok`` is discouraged. Use `Jumlah Kelompok`
## instead.

qplot(x= KKM94$`Jumlah Program`, fill = Tempat, data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.
## Warning: Use of `KKM94$`Jumlah Program`` is discouraged. Use `Jumlah Program`
## instead.

qplot(x= KKM94$`Jumlah Kelompok`, fill = Gender, data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.
## Warning: Use of `KKM94$`Jumlah Kelompok`` is discouraged. Use `Jumlah Kelompok`
## instead.

qplot(x= `Jumlah Kelompok`, colour = Tempat , data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.

qplot(x= `Jumlah Kelompok`, colour = Gender , data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.

qplot(x= `Jumlah Kelompok`, colour = Fakultas , data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.

qplot(x= `Jumlah Program`, colour = Gender , data = KKM94, geom = c("density"), alpha=.7) + 
  guides(alpha = FALSE)
## Warning: `guides(<scale> = FALSE)` is deprecated. Please use `guides(<scale> =
## "none")` instead.

library(GGally)
library(dplyr)
library(ggplot2)
library(gapminder)
## Warning: package 'gapminder' was built under R version 4.1.2
KKM94 %>%
 select(-Nama) %>%
 ggpairs(aes(color=Gender))
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

plot(KKM94$`Jumlah Program`, type="l")

plot(KKM94$`Jumlah Program`)

plot(KKM94$`Jumlah Program`,type="b")

boxplot(KKM94$`Jumlah Kelompok`)  

hist(KKM94$`Jumlah Kelompok`)

plot(density(KKM94$`Jumlah Kelompok`))

plot(KKM94$`Jumlah Program`, KKM94$`Jumlah Kelompok`) # Scatter plot of x and y data

plot(KKM94$`Kode Program`, KKM94$`Jumlah Kelompok`) # Scatter plot of x and y data

plot(KKM94$`Kode Program`, KKM94$`Jumlah Program`) # Scatter plot of x and y data

datamahasiswa <- 
  tibble::tribble(
       ~NIM, ~Nama, ~'Kode Fakultas',~'Kode Gender',
       19240072, 'Erika Putri Septiana', 24, 1, 
       19190006, 'Muhammad Azrul Efendy', 19, 2,
       19240068, 'Zakiyana Afazani Al Maula', 24, 1,
       
       
       
       
       )
datamahasiswa
## # A tibble: 3 x 4
##        NIM Nama                      `Kode Fakultas` `Kode Gender`
##      <dbl> <chr>                               <dbl>         <dbl>
## 1 19240072 Erika Putri Septiana                   24             1
## 2 19190006 Muhammad Azrul Efendy                  19             2
## 3 19240068 Zakiyana Afazani Al Maula              24             1
datafakultas <- 
  tibble::tribble(
    ~'Kode Fakultas', ~'Nama Fakultas',
    '24', 'syariah',
    '19', 'itk'
  )
datafakultas
## # A tibble: 2 x 2
##   `Kode Fakultas` `Nama Fakultas`
##   <chr>           <chr>          
## 1 24              syariah        
## 2 19              itk
datagender <- 
  tibble::tribble(
    ~'Kode Gender', ~'Nama Gender',
    '1', 'putri',
    '2', 'putra'
  )
datagender
## # A tibble: 2 x 2
##   `Kode Gender` `Nama Gender`
##   <chr>         <chr>        
## 1 1             putri        
## 2 2             putra