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

Using Google Translate Notebook for learning a languages
In this work, with google translate notebook, a spreadsheet is exported then imported to R studio to generate a webpage.
Nueva Esperanza-new
BoxPlot
boxplot(Sepal.Length ~ Species, data = iris, main = "Box Plot of Sepal Length by Species", col = "lightblue")
Waffle chart
waffle(table(iris$Species), rows = 5, title = "Waffle Chart of Iris Species")
Radar chart
library(fmsb) iris_means <- aggregate(iris[, 1:4], by = list(iris$Species), FUN = mean) radarchart(iris_means[, -1], title = "Radar Chart of Iris Species Means")
Map
library(maps) library(ggmap) data("USArrests") us_map <- map_data("state") USArrests$region <- tolower(rownames(USArrests)) map_data <- merge(us_map, USArrests, by = "region") map_plot <- ggplot(map_data, aes(x = long, y = lat, group = group, fill = Murder)) + geom_polygon(color = "black") + scale_fill_gradient(low = "white", high = "red") + labs(title = "Map: Murder Rate by State", fill = "Murder Rate") + theme_void() print(map_plot)
World cloud
Wordcloud
Box Plot
box_plot <- ggplot(diamonds, aes(x = cut, y = price, fill = cut)) + geom_boxplot() + labs(title = "Box Plot: Price Distribution by Cut", x = "Cut", y = "Price") + theme_minimal() print(box_plot)
Waffle chart
library(wordcloud) library(fmsb) library(waffle) library(reshape2) color_counts <- diamonds %>% group_by(color) %>% summarise(count = n()) waffle_chart <- waffle(color_counts$count, rows = 5, title = "Waffle Chart: Proportion of Diamonds by Color") print(waffle_chart)
Word Cloud
library(wordcloud) library(fmsb) library(waffle) library(reshape2) wordcloud(words = unique(diamonds$clarity), freq = table(diamonds$clarity), colors = brewer.pal(8, "Dark2"), main = "Word Cloud: Diamond Clarity")
Scatter plot & Line plot
ggplot(airquality, aes(x = Temp, y = Ozone)) + geom_point() + geom_smooth(method = "lm", col = "red") + ggtitle("Regression Plot: Temperature vs Ozone") + xlab("Temperature") + ylab("Ozone")
Line plot
plot(iris$Sepal.Length, type = "l", main = "Line Plot of Sepal Length", xlab = "Index", ylab = "Sepal Length", col = "purple")