Steven P. Sanderson II, MPH ยท @stevensanderson
116 followers ยท 607 posts ยท Server mstdn.social

๐Ÿ“ข Simplifying Dates and Times in R: Base R vs. lubridate ๐Ÿ“†โฐ

as.Date() class: In R, as.Date() converts input to a date format. For example, class(as.Date("1881/10/25")) yields the "Date" class.

Today's date and time: Use today() and now() to fetch the current date or date and time effortlessly.

Class compatibility: as_date() (lubridate) and as.Date() (base R) produce the same "Date" class output.

#lubridate #datesandtimes #RStats #rprogramming

Last updated 2 years ago

Steven P. Sanderson II, MPH ยท @stevensanderson
86 followers ยท 473 posts ยท Server mstdn.social

Are you a New Yorker who relies on heating oil to keep your home warm during the winter months? Keeping track of heating oil prices is essential for making informed decisions about when to buy and how much to purchase. With the help of R, accessing and visualizing the latest heating oil prices in New York is easier than ever before.

Link to the blog post: spsanderson.com/steveondata/po

#lubridate #purrr #nys #oil #rvest #xml2 #dplyr #timetk #datavisualization #NewYork #heatingoil #r

Last updated 2 years ago

Luke Morris ๐Ÿ’œ :rstats: ยท @lukemorris
139 followers ยท 57 posts ยท Server fosstodon.org

@filmicaesthetic I learned via so the first line in all my scripts is library(tidyverse)

And I'm excited for the day is folded in. Essentially one less line in all my scripts!

#tidyverse #lubridate

Last updated 2 years ago