I have a dataframe like this:
auftreten_Fehler Diff_Fehler auftreten_Warnung Diff_Warnung
1 2016-08-10 17:35:25 207.0000 2016-08-10 17:08:56 207.0000
2 2016-08-29 19:16:10 226.0000 2016-08-29 19:15:48 226.0000
3 2016-08-30 19:38:28 234.0000 2016-08-30 19:38:24 234.0000
4 2016-10-22 00:30:20 204.3333 2016-10-20 20:05:11 224.0000
5 2016-10-26 19:19:42 234.0000 2016-10-26 19:16:27 234.0000
6 2016-10-27 15:31:44 235.0000 2016-10-27 05:21:46 235.0000
7 2016-10-28 10:39:28 204.3333 2016-10-28 10:39:24 204.3333
8 2016-11-07 19:12:26 207.0000 2016-11-07 19:12:18 207.0000
9 2016-11-16 11:14:51 204.3333 2016-11-11 09:18:46 213.0000
I would like to show only the rows with this condition:
k<-(FehlerWarnung[i,]$auftreten_Fehler - FehlerWarnung[i,]$auftreten_Warnung)
units(k)<-"mins"
if(k<2) #Show only rows if the difference is less than two minuts
How can I do this job with àpply` or something else in one row of code?