[R] median for time data
uvilla
maruchavez83 at hotmail.com
Tue Dec 1 19:16:23 CET 2009
Thanks a lot for your answer Jannis.
Actually, I should have specified what I`m trying to do.
I have a datafame which 3 colums, one is the "person ID", second is "Anfag"
and third is "Ende". The two time colums are in this way: "8:50:10", so I
have to calculate the medan of the Anfag colum and to determine the length
of the route.
When I use strptime() I just get NA NA NA
I`m new at using R, must finisth this work thoug
I guess Im doing totally wrong, actually everytime i try to use "POSIXct" it
doesn`t work
Thanks a lot
Jannis wrote:
>
> Hi,
>
>
> try to convert this to the R time format "POSIXct" or "POSIXlt" via
> strptime(). Then you can simply substract them. I am not sure whether a
> median can be calculated though (should be possible as POSIXct stores
> the value as seconds since 1970....)
>
> Best
> Jannis
>
> uvilla schrieb:
>> Hi everybody
>>
>> How do I do to calculate the median and average of a colum of time data
>> like
>> this: "8:50:10". I also need to plot the time difference between two
>> colums
>> Thanks a lot
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>
>
--
View this message in context: http://n4.nabble.com/median-for-time-data-tp932287p932402.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list