diff options
| author | Vishnudrm <vishnurajagopal28@gmail.com> | 2024-09-19 12:58:47 +0530 |
|---|---|---|
| committer | Vishnudrm <vishnurajagopal28@gmail.com> | 2024-09-19 12:58:47 +0530 |
| commit | 39640cef1255bd6e9378c6c4856ae40524d5c4bf (patch) | |
| tree | 0849acd40ca117edad46a1f759755438002ce55c | |
| -rw-r--r-- | diamonds.r | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/diamonds.r b/diamonds.r new file mode 100644 index 0000000..92d438a --- /dev/null +++ b/diamonds.r @@ -0,0 +1,14 @@ +install.packages("tidyverse") +library(tidyverse) +head(diamonds) +str(diamonds) +glimpse(diamonds) +colnames(diamonds) +rename(diamonds,carat_new=carat) +rename(diamonds,carat_new=carat,cut_new=cut) +summarize(diamonds,mean_carat=mean(carat)) +ggplot(data = diamonds, aes(x = carat, y = price)) +geom_point() +ggplot(data = diamonds, aes(x = carat, y = price, color = cut)) +geom_point() +ggplot(data = diamonds, aes(x = carat, y = price, color = cut)) + +geom_point() +facet_wrap(~cut) + |
