This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
library("readxl")
# xls files
my_data <- read_excel("C:/Users/14252/Desktop/ACI_Sealevels_monthly_smoothed.xlsx", sheet = 1)
my_data
library(ggplot2)
library(directlabels)
## Warning: package 'directlabels' was built under R version 4.1.3
my_data<-data.frame(my_data)
pica <- ggplot(data=my_data, aes(x = Months, y = change))+
geom_point(aes(color = Station))+
geom_dl(aes(label=Station),method="last.points")+
ylim(-4,4)+
xlim(0,800)+
labs(title = "Sea level change in Millimeters, from January of 1969 to Febuary of 2022",
subtitle = "Plot of 5 different Regions",
caption = "Data source: Actuary Climate Index",
y = "Change in Millimeters of Sea level from base(1969)",
x = "Total months (starting from 1969 to Febuary of 2022" )
pica
## Warning: Removed 49 rows containing missing values (geom_point).
## Warning: Removed 49 rows containing missing values (geom_dl).
Note that the echo = FALSE
parameter was added to the code chunk to prevent printing of the R code that generated the plot.