#Load train.csv data file

file_path <- “C:\Users\fardm\OneDrive\Desktop\PhD\train.csv” data <- read.csv(“C:\Users\fardm\OneDrive\Desktop\PhD\train.csv”)

#Print the Summary of the data

summary(data)

#Print the structure of the data

str(data)

Variable Type Classification

If PassengerId serves as an identifier without meaningful order,

#it should be converted to a categorical factor using as.factor().

data\(PassengerId <- as.factor(data\)PassengerId)

#If representing categories (e.g., “True” or “False”), convert to a logical factor using as.logical().

data\(VIP <- as.logical(data\)VIP)

#If representing categories (e.g., “True” or “False”), convert to a logical factor using as.logical()

data\(Transported <- as.logical(data\)Transported)