Another solution, as a fix to my original algorithm, was found by a colleague
(Matthew Roberts). While he claims not too much for its elegance, it does
seem to work. This fix is based on the use of the 'pmax' function. This
function is a variant of the 'max' (maximum) function to return a vecto
esp wrote:
>
> For the function as defined above using 'sapply'
>> spot[,1]
> 01/09/2009 01/09/2009 00:00:01 01/09/2009 00:00:02 01/09/2009
> 00:00:03
> 1251759600 1251759601 1251759602
> 1251759603
>
> This was unexpected - it seems to have display
See below.
On Mon, Oct 5, 2009 at 6:50 PM, Gabor Grothendieck
wrote:
> Try this. First we read a line at a time into L except for the
> header. Then we use strapply to match on the given pattern. It
> passes the backreferences (the portions within parentheses in the
> pattern) to the function
Thank you all who replied, I will try out these ideas later today.
David Esp
--
View this message in context:
http://www.nabble.com/Date-Time-Stamp-input-method-for-user-specific-formats-tp25757018p25763935.html
Sent from the R help mailing list archive at Nabble.com.
___
Try this. First we read a line at a time into L except for the
header. Then we use strapply to match on the given pattern. It
passes the backreferences (the portions within parentheses in the
pattern) to the function (defined via a formula) whose implicit
arguments are x, y and z. That function
On Oct 5, 2009, at 5:14 PM, esp wrote:
Date-Time-Stamp input method to correctly interpret user-specific
formats:coding is 90% there - based on exmple at
http://tolstoy.newcastle.edu.au/R/help/05/02/12003.html
...anyone got the last 10% please?
CONTEXT:
Data is received where one of the col
Off the top of my head, I think you're working to hard at this.
I would read in the timestamp column as a character string. Then,
find those where the string length is too short [using nchar()],
append "00:00:00" to those [using paste()], and then convert to
POSIXt [using as.POSIXct()].
No
Date-Time-Stamp input method to correctly interpret user-specific
formats:coding is 90% there - based on exmple at
http://tolstoy.newcastle.edu.au/R/help/05/02/12003.html
...anyone got the last 10% please?
CONTEXT:
Data is received where one of the columns is a datetimestamp. At midnight,
th
8 matches
Mail list logo