#Load train.csv data file
file_path <- “C:\Users\fardm\OneDrive\Desktop\PhD\train.csv” train_data <- read.csv(“C:\Users\fardm\OneDrive\Desktop\PhD\train.csv”)
numeric_vars <- sapply(train_data, is.numeric) numeric_data <- train_data[, numeric_vars] # Create pairs plot
pairs(numeric_data, pch = 16, col = “blue”, main = “Pairs Plot of Quantitative Variables”)
ggplot(train_data, aes(x = HomePlanet , fill = VIP)) + geom_bar(position = “dodge”) + labs(title = “Comparison of HomePlanet and VIP” , x = “HomePlanet” , y = “Count”)
ggplot(train_data, aes(x = CryoSleep, y = Age, fill = CryoSleep)) + geom_boxplot() + labs(title = “Comparison of CryoSleep and Age” , x = “CryoSleep” , y = “Age”)
ggplot(train_data, aes(x = Destination, y = Age, color = Destination)) + geom_jitter() + labs(title = “Comparison of Destination and Age” , x = “Destination” , y = “Age”)
ggplot(train_data, aes(x = VIP, fill = Destination)) + geom_bar() + labs(title = “Comparison of VIP and Destination”, x = “VIP”, y = “Count”)