Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

Subset dataset with time condition in R

$
0
0

I have a dataset like this in example.txt

"09/Jan/2016""05:00:22""304" 449
"09/Jan/2016""07:00:12""304" 449
"09/Jan/2016""10:00:02""200" 10575
"09/Jan/2016""11:00:03""304" 449
"09/Jan/2016""13:00:03""304" 449
"09/Jan/2016""20:00:03""304" 449 
"09/Jan/2016""23:00:03""304" 450 
"10/Jan/2016""00:00:03""304" 449 
"10/Jan/2016""03:00:03""304" 449 
"10/Jan/2016""04:00:03""304" 449 

Can I subset my dataset from range six hour before I run my code in R? For example, I open and run my code in January 10th, at 4:15, so I want subset from my dataset, like

"09/Jan/2016""23:00:03""304" 450 
"10/Jan/2016""00:00:03""304" 449 
"10/Jan/2016""03:00:03""304" 449 
"10/Jan/2016""04:00:03""304" 449 

what function should I use for my question? and how to use it?


Viewing all articles
Browse latest Browse all 206278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>