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!
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 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.
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... =/
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?
@@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!
Hi, your Videos save my Bachelor Thesis. Thank you^^
That’s awesome to hear! You’re welcome!
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!
Glad it helped!
Awesome. found very useful
Clearly explained. Thanks!!
You're welcome!
thanks alots maam
God bles you
You're welcome!
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.
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
@@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.
@@weecology ohhhh Thank you so much I know now how to handle my data. Youre awesome.
@@rigelrixton6662 So happy it has helpful. Good luck with your analysis!
Good.
Pls explain what happen if missing records are there.
Data cleaners remove empty records which leads to missing days. etc
what are basic temporal statistical summaries in time series?
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... =/
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?
@@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!
@@johannaw2031 Exactly! Glad it helped!