[R] Subset()
Jim Lemon
drjimlemon at gmail.com
Sat Jan 21 11:41:16 CET 2017
Hi Elise,.
I would ask:
class(data$DateTime)
and see if it returns:
"POSIXct" "POSIXt"
Jim
On Sat, Jan 21, 2017 at 3:02 AM, Elise LIKILIKI
<elise.likiliki at gmail.com> wrote:
> Hello,
>
> I have a dataset containing Date Time, Air Temperature, PPFD, Sol
> Temperature...
> The first data are false so I would like to extract the other ones.
> I've tried :
>>data1<-subset(data,DateTime>=as.POSIXct("2017-01-10
> 11:00:00",format="%Y-%m-%d
> %H:%M:%S"),select=c(DateTime,PPFD_Avg,Air_Temp_Avg,RH_Avg,Soil_Temp_Avg))
> But I still have 4 rows with data from 2017-01-10 10:00:00 to 2017-01-10
> 10:45:00 and I don't understand why.
>
> Does anyone could help me please.
>
> Thanks,
>
> Elise LIKILIKI
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list