Skip to content
Prev 314427 / 398503 Next

Question on creating Date variable

On 01 January 2013 03:00:18, David Winsemius wrote:
'How could that represent any disclosure of proprietary information if 
presented with no context? ' I must agree with you. But I just dont 
want to take any risk! (job scenario in my country is not very 
optimistic and I want to give my boss minimal chance/reason to fire!)

And secondly with your approach, I cant do any calculation. Let take 
following example:

y <- format( as.POSIXct(as.character(x), format="%H.%M"),  # That is 
the input format
             format="%I.%M %p")

y[3] - y[2]

This gives me following error:

Error in y[3] - y[2] : non-numeric argument to binary operator

I am having same error with Devid's approach as well:
Error in z[2] - z[1] : non-numeric argument to binary operator.

Thanks and regards,