library(readxl) library(dplyr) library(ggplot2) library(psych)
data <- readxl::read_excel(“C:\Users\ACER\Downloads\datamarkdown.xlsx”)
#Filter Data 2000-2015 (ketikkan tahun) filtered_data <- data %>% filter(Year == 2000) %>% print
summary_stats <- summary(filtered_data) summary_stats
cor_result1 <- cor(filtered_data\(Infant_deaths, filtered_data\)Adult_mortality, method = “spearman”) cor_result1 # Scatter Plot Variabel Infant Death dan Adult Mortality ggplot(filtered_data, aes(x = Infant_deaths, y = Adult_mortality)) + geom_point() + labs(x = “Infant_deaths”, y = “Adult_mortality”, title = “Scatter Plot 1”)
cor_result1 <- cor(filtered_data\(Under_five_deaths, filtered_data\)Adult_mortality, method = “spearman”) cor_result1 # Scatter Plot Variabel Infant Death dan Adult Mortality ggplot(filtered_data, aes(x = Under_five_deaths, y = Adult_mortality)) + geom_point() + labs(x = “Under_five_deaths”, y = “Adult_mortality”, title = “Scatter Plot 2”)
cor_result1 <- cor(filtered_data\(Incidents_HIV, filtered_data\)Adult_mortality, method = “spearman”) cor_result1 # Scatter Plot Variabel Infant Death dan Adult Mortality ggplot(filtered_data, aes(x = Incidents_HIV, y = Adult_mortality)) + geom_point() + labs(x = “Incidents_HIV”, y = “Adult_mortality”, title = “Scatter Plot 3”)