Skip to content
Prev 293305 / 398502 Next

factor conversion to date/time

On 02/05/2012 8:08 AM, marjolein post wrote:
To stop the conversion to factors, use argument stringsAsFactors=FALSE 
when you read the file, or even better, options(stringsAsFactors=FALSE) 
for a global change.

To convert a string, specify the format (following the instructions in 
?strptime):

x <- "1981-01-02T08:00I"
strptime(x, format="%Y-%m-%dT%H:%MI")

Duncan Murdoch