Easy R :Working with dates in R programming: Exploring the as.Date Function and Format Specifiers

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 8

  • @AliBaBa-ol3cj
    @AliBaBa-ol3cj 5 месяцев назад

    What a GREAT teacher professor Choure. We need more professors like you to spread the gospel about using R for data analysis/science, this wonderful tool has been undermined for too long.

    • @DevResearch
      @DevResearch  5 месяцев назад

      Thanks for good words. This appreciation really motivates to work more.

  • @3bdullah3bdu
    @3bdullah3bdu Год назад +1

    great video, did we can change 2 different type of date was save in one list to date type . c("2010-10-12", "11-10-2010") ?

    • @DevResearch
      @DevResearch  Год назад

      Yes. We can. Just use tryFormats=c("format1","format1"...) In arguments of as.Date()

  • @adetunjiademola1330
    @adetunjiademola1330 10 месяцев назад

    Well explained. What if I want to convert a whole column and find the difftime?

    • @DevResearch
      @DevResearch  10 месяцев назад

      # any format
      # Install and load the anytime package
      install.packages("anytime")
      library(anytime)
      # Your data frame with a column of date strings (assume it's named 'date_column')
      your_data_frame

  • @adetunjiademola1330
    @adetunjiademola1330 10 месяцев назад

    The date also contained time data. How do I convert and find the difftime?

    • @DevResearch
      @DevResearch  10 месяцев назад

      #try this
      # Example dates in string format
      date_str1