This is an R Markdown Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the Run button within the chunk or by placing your cursor inside it and pressing Ctrl+Shift+Enter.
x_var <- seq(from = 0, to = 10, by = 0.1)
y_var <- 3.21*x_var - 10
df <- data.frame(x_var,y_var)
library(ggplot2)
ggplot(df, aes(x=x_var, y=y_var)) + geom_smooth()
plot(cars)
library(ggplot2)
ggplot(diamonds, aes(x=carat, y=price, color=cut)) + geom_point() + labs(title="Scatterplot", x="Carat", y="Price") # add axis lables and plot title.
LS0tDQp0aXRsZTogIkdlbmVyYWxpemVkIExpbmVhciBNb2RlbHMiDQpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sNCi0tLQ0KDQpUaGlzIGlzIGFuIFtSIE1hcmtkb3duXShodHRwOi8vcm1hcmtkb3duLnJzdHVkaW8uY29tKSBOb3RlYm9vay4gV2hlbiB5b3UgZXhlY3V0ZSBjb2RlIHdpdGhpbiB0aGUgbm90ZWJvb2ssIHRoZSByZXN1bHRzIGFwcGVhciBiZW5lYXRoIHRoZSBjb2RlLiANCg0KVHJ5IGV4ZWN1dGluZyB0aGlzIGNodW5rIGJ5IGNsaWNraW5nIHRoZSAqUnVuKiBidXR0b24gd2l0aGluIHRoZSBjaHVuayBvciBieSBwbGFjaW5nIHlvdXIgY3Vyc29yIGluc2lkZSBpdCBhbmQgcHJlc3NpbmcgKkN0cmwrU2hpZnQrRW50ZXIqLiANCg0KYGBge3J9DQp4X3ZhciA8LSBzZXEoZnJvbSA9IDAsIHRvID0gMTAsIGJ5ID0gMC4xKQ0KeV92YXIgPC0gMy4yMSp4X3ZhciAtIDEwDQpkZiA8LSBkYXRhLmZyYW1lKHhfdmFyLHlfdmFyKQ0KbGlicmFyeShnZ3Bsb3QyKQ0KZ2dwbG90KGRmLCBhZXMoeD14X3ZhciwgeT15X3ZhcikpICsgZ2VvbV9zbW9vdGgoKQ0KYGBgDQoNCmBgYHtyfQ0KcGxvdChjYXJzKQ0KYGBgDQoNCmBg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