Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Load necessary library
- library(readxl)
- # Load data from an Excel file
- credit <- read_excel("YourFolderName/CreditCardUpgrade.xlsx")
- # Convert 'upgraded' and 'extraCards' columns to factors with levels 'No' and 'Yes'
- credit$upgraded <- factor(credit$upgraded, levels=c(0,1), labels=c("No","Yes"))
- credit$extraCards <- factor(credit$extraCards, levels=c(0,1), labels=c("No","Yes"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement