Displaying 2 results from an estimated 2 matches for "newdatetim".
Did you mean:
newdatetime
2011 Sep 08
2
help subsetting data based on date AND time
...eriods.
The date and time of sample collection are in a combined Date/Time field in
the format yyyy-mm-dd hh:mm:ss. I need to be able to subset the data for
analysis of different date and time windows. Thus far, I have tried casting
the Date/Time field using several approaches, such as:
DataSet$NewDateTime <- strptime(DataSet$DateTime, '%Y-%m-%d %H:%M:%S')
DataSet$NewDateTime <- as.POSIXlt(strptime(DataSet$DateTime, '%Y-%m-%d
%H:%M:S'))
These instructions seem to cast the NewDateTime field correctly (at least it
appears to be in the correct format, and I assume R sees the fiel...
2012 Jul 14
3
Can't understand syntax
...test [["v3"]] [!(is.na
(test[["v3"]]))]
thanks!
On Fri, Jul 13, 2012 at 6:41 AM, Rui Barradas <ruipbarradas@sapo.pt> wrote:
> Hello,
>
> Check the structure of what you have, df and newdf. You will see that in
> df dateTime is of class POSIXlt and in newDf newDateTime is of class
> POSIXct.
>
> Solution:
>
> [...]
> df$dateTime <- strptime(df$dateTime,"%m/%d/%Y %H:%M")
> df$dateTime <- as.POSIXct(df$dateTime)
> [...]
>
> Hope this helps,
>
> Rui Barradas
>
> Em 13-07-2012 10:24, vioravis escreveu:
>
&...