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

Scatter plot
plot(iris$Sepal.Length, iris$Sepal.Width, main = "Scatter Plot: Sepal Length vs Sepal Width", xlab = "Sepal Length", ylab = "Sepal Width", col = iris$Species, pch = 19)
Scatter Plot
library(ggplot2) library(dplyr) scatter_plot <- ggplot(diamonds, aes(x = carat, y = price, color = cut)) + geom_point(alpha = 0.5) + labs(title = "Scatter Plot: Carat vs Price", x = "Carat", y = "Price") + theme_minimal() print(scatter_plot)
PieChart-2
pie(table(airquality$Month), main = "Pie Chart of Months in Airquality Dataset", col = rainbow(length(unique(airquality$Month))))
PieChart-1
pie(table(iris$Species), main = "Pie Chart of Iris Species", col = rainbow(length(unique(iris$Species))))
Pie chart
library(ggplot2) library(dplyr) clarity_counts <- diamonds %>% group_by(clarity) %>% summarise(count = n()) %>% mutate(percentage = count / sum(count) * 100) pie_chart <- ggplot(clarity_counts, aes(x = "", y = percentage, fill = clarity)) + geom_bar(stat = "identity", width = 1) + coord_polar("y") + labs(title = "Pie Chart: Proportion of Diamonds by Clarity") + theme_void() print(pie_chart)
Histogram-2
hist(airquality$Temp, main = "Histogram of Temperature", xlab = "Temperature", col = "pink")
Histogram-1
hist(iris$Sepal.Length, main = "Histogram of Sepal Length", xlab = "Sepal Length", col = "orange")
Bar plot-2
barplot(table(airquality$Month), main = "Bar Chart of Months in Airquality Dataset", xlab = "Month", ylab = "Count", col = "lightgreen")
Analysis of Storm Data
Analysis of storm data to see which events are the most harmful in terms of public health and economic impact
Bar plot-1
barplot(table(iris$Species), main = "Bar Chart of Iris Species", xlab = "Species", ylab = "Count", col = "skyblue")
Histogram
library(ggplot2) histogram <- ggplot(diamonds, aes(x = price)) + geom_histogram(binwidth = 500, fill = "blue", color = "black") + labs(title = "Histogram: Distribution of Diamond Prices", x = "Price", y = "Frequency") + theme_minimal() print(histogram)
Bar Plot
library(ggplot2) data("diamonds") bar_chart <- ggplot(diamonds, aes(x = cut, fill = cut)) + geom_bar() + labs(title = "Bar Chart: Count of Diamonds by Cut", x = "Cut", y = "Count") + theme_minimal() print(bar_chart)