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

Document
DL 19 - CDMX
FKassoh_Assignment3_PS1_PS2
factor by economic status
# Load necessary libraries library(ggplot2) library(plotly) library(htmlwidgets) # 1. Create the ggplot object with the boxplot gg_boxplot <- ggplot(data, aes(x = Economy_status_Developed, y = Life_expectancy)) + geom_boxplot() + labs(title = "Boxplot of Life Expectancy by Economy Status", x = "Economy Status", y = "Life Expectancy") # 2. Convert the ggplot object to a Plotly object p_plotly <- ggplotly(gg_boxplot) # 3. Display the interactive plot in the RStudio viewer or your web browser # This will show the plot in your RStudio's viewer pane or default web browser print(p_plotly) # 4. Save the Plotly plot as an HTML file htmlwidgets::saveWidget(p_plotly, "Life_Expectancy_by_Status_Plotly.html")
Normal 1qq plot
comparative histogram
Document