Question: Selecting Specific Rows with Date and Time values in Rstudio
0
gravatar for paramount.amin
7 weeks ago by
paramount.amin0 wrote:

In order to investigate the seasonality effect in my data set, I want to select rows with a specific date and time values. I have multiple rows with the same date and time value ( i have combined multiple CSV files, each starting from the first day of January to the last day of December). I am using the following code;

filter(data,data$DateTime > "2019-01-01" & data$DateTime < "2019-03-01" )

but the results are not what I want. How can I select my desired range of date and time and save it in a distinct data frame to perform my analysis on it?

Thank you

R • 136 views
ADD COMMENTlink modified 7 weeks ago • written 7 weeks ago by paramount.amin0
1

Check the attached thread in StackOverflow https://stackoverflow.com/questions/22420487/subsetting-data-table-set-by-date-range-in-r

  • Convert the type of date column to Date.
ADD REPLYlink written 7 weeks ago by Arup Ghosh2.7k

Now it just returns NA values!

ADD REPLYlink modified 7 weeks ago • written 7 weeks ago by paramount.amin0

Share an excerpt of the data.

ADD REPLYlink written 7 weeks ago by Arup Ghosh2.7k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1230 users visited in the last hour