Importing Data into a Time Series Object

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024
  • Pt 3. We learn about a type of data structure used for many time series analysis functions in R and load our data into the structure.

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

  • @Yarin509
    @Yarin509 Год назад +1

    Hi, your Videos save my Bachelor Thesis. Thank you^^

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

      That’s awesome to hear! You’re welcome!

  • @Blood4Justice
    @Blood4Justice 8 месяцев назад

    thank you very much, most videos do not have that "string as factors" piece which turned out to be why my data was not read properly. Using your code fixed it!

    • @weecology
      @weecology  8 месяцев назад

      Glad it helped!

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

    Awesome. found very useful

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

    Clearly explained. Thanks!!

  • @Hamzakhan-cc6nq
    @Hamzakhan-cc6nq 2 года назад +1

    thanks alots maam
    God bles you

  • @rigelrixton6662
    @rigelrixton6662 3 года назад +1

    Oh Im so sorry if I remove my comment because I thought this is not active anymore. But I actually have read it. Thank you so much by the way for the vid. I wonder why it has less views.

    • @rigelrixton6662
      @rigelrixton6662 3 года назад

      But the thing in adding a fixed day would it be make the data somewhat false? because it might the data was released on a different day so on

    • @weecology
      @weecology  3 года назад +1

      @@rigelrixton6662 Yes, it depends on the details of how the data is collected and analyzed whether this approach will work or not. In many cases it will be fine because you are basically analyzing it as evenly spaced monthly data, which this approach allows. In cases where it is not OK then you can store them as `yearmon` data using the `zoo` package (see stackoverflow.com/questions/37009720/how-to-transform-dates-in-y-m-format-without-days) but you won't have access to most of the standard functions that work on dates.

    • @rigelrixton6662
      @rigelrixton6662 3 года назад

      @@weecology ohhhh Thank you so much I know now how to handle my data. Youre awesome.

    • @weecology
      @weecology  3 года назад

      @@rigelrixton6662 So happy it has helpful. Good luck with your analysis!

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

    Good.
    Pls explain what happen if missing records are there.
    Data cleaners remove empty records which leads to missing days. etc

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

    what are basic temporal statistical summaries in time series?

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

    Why did you have to put the comma at the end when you ordered it at 2:55? You said that otherwise it would break? Such details are the hardest part to learn with R... =/

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

      The reason you need the comma relates to the way [ ] work for subsetting data frames. If you just give it a single value or a single vector it will return the columns associated with those numbers. So, data[1] gives the first column and data[c(1, 2, 3)] returns the first three columns. But, if you give it two numbers separated by a comma the first number designates the row and the second number the column. So data[1, 2] gives the value in first row of the second column and data[c(1, 2, 3), 2] gives the first, second, and third rows of the second column. If you want all of the rows or all of the columns you leave that part blank. So, data[c(1, 2, 3),] gives you the first three rows of all columns.
      And that's what this command is doing for us, except that it's giving us all of the rows, ordered by the date, and all of the columns for each of those rows, so it sorts the dataframe by date.
      Does that help clear things up?

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

      @@weecology That is a clear explanation! Many thanks for elaborating. So if I only want to make a subset of the data a ts-object then I dont have to pick an entire column. That makes sense. Thanks!

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

      @@johannaw2031 Exactly! Glad it helped!