stevensanderson, to programming
@stevensanderson@mstdn.social avatar

Wrangling dates in R got you pulling your hair? ⏱️ Time travel to mastery with these 3 powerful tools:

Base R's seq.Date: Your daily/weekly/monthly hero.
lubridate's seq: Filter magic for specific weekdays. Analyze those Tuesdays!
timetk's tk_make_timeseries: Define complex sequences in a simple table. Easy time travel!

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-02-14/

image/png
image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Ever wondered what day a historical event fell on, or analyzed data based on weekdays?

Join the R time-bending party with lubridate! This magical package simplifies date & time manipulation, making day-of-week extraction a breeze. 🪄

P.S. Want the numerical day (1 for Monday)? Use as.numeric(wday(date)).

#RStats #lubridate #DataScience #R #rprogramming #dates #timeseries

Post: https://www.spsanderson.com/steveondata/posts/2024-02-09/

image/png

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

R data mystery: is that column a date? ️‍♀️ Fear not! Unleash lubridate's date magic & healthyR.ts' time series power to unmask them! 🪄 Explore formats, validate time series, conquer your data! Ready? Test these tools, share your finds! Happy coding, clear dates await!

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-02-08/

image/png

stevensanderson, to random
@stevensanderson@mstdn.social avatar

Extract week numbers from dates in R using strftime() & %V format code or lubridate's week() function. Just pass the date object to easily get the week number. Great for wrangling temporal data! Try it out on sample dates in R to get comfortable with date manipulation for time series analysis. Check my blog for details & examples of using these functions. Handling dates is an important R skill - give it a go!

#R

Post: https://www.spsanderson.com/steveondata/posts/2024-02-06/

stevensanderson, to datascience
@stevensanderson@mstdn.social avatar

Stuck in time-warp data analysis? Want to rewind timestamps without debugging woes? Ditch the flux capacitor, R's got your back! ⏱️

Base R Magic:

  • Times in R are just numbers. Convert your timestamp, then subtract hours in seconds (remember 3600 sec/hour!). Presto! 🪄

Lubridate Time Travel:

  • Want it slicker? lubridate's your friend! Its hours(X) function subtracts hours like a charm, making your code shine. ✨

Post: https://www.spsanderson.com/steveondata/posts/2024-01-30/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • GTA5RPClips
  • thenastyranch
  • tacticalgear
  • ethstaker
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • Youngstown
  • mdbf
  • khanakhh
  • slotface
  • rosin
  • provamag3
  • kavyap
  • everett
  • cisconetworking
  • Durango
  • modclub
  • osvaldo12
  • tester
  • Leos
  • cubers
  • normalnudes
  • megavids
  • anitta
  • lostlight
  • All magazines