RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post

Recently Published

HTML
Jessica_McPhaul_6372_HW_Unit_9
March 11, 2024
Brazil_Emily_Homework_3
HTML
Hidalgo - Tula de Allende
Test
Document
Data 608 - HW7
HTML
Plot from homeowrk 9
# Load necessary libraries library(GGally) library(dplyr) # Check if 'censor' column exists in 'training' and 'validate' datasets if (!("censor" %in% names(training)) || !("censor" %in% names(validate))) { # Assuming 'censor' is the last column in the provided subset response_col_name <- names(training)[ncol(training)] # Recode the response variable in both training and validation sets training[[response_col_name]] <- factor(training[[response_col_name]], levels = c(0, 1), labels = c("Malignant", "Benign")) validate[[response_col_name]] <- factor(validate[[response_col_name]], levels = c(0, 1), labels = c("Malignant", "Benign")) } else { # If 'censor' exists, recode directly training$censor <- factor(training$censor, levels = c(0, 1), labels = c("Malignant", "Benign")) validate$censor <- factor(validate$censor, levels = c(0, 1), labels = c("Malignant", "Benign")) } # Generate ggpairs plot for the training data ggpairs(training, columns = 1:9, ggplot2::aes(color = response_col_name))
Plot LNVU
Plot VU