あなたのように日時文字列を変換するには、次のように構造関数を使用することをお勧めします。
> # begin with date-time values stored as character vectors ("strings"):
> w
[1] "2000-07-06 00:00:00"
> typeof(w)
[1] "character"
> class(w)
[1] "character"
> # use structure to convert them
> w = structure(w, class=c("POSIXt, POSIXct"))
> # verify that they are indeed R-recognizable date-time objects:
> w
[1] "2000-07-06 00:00:00"
attr(,"class")
[1] "POSIXt, POSIXct"
w/r/t メカニズム: R 関数はベクトル化されるため、次のように、日付の列を渡して結果を同じ列にバインドできます。
> j$day
[1] 1353967580 1353967581 1353967583 1353967584 1353967585 1353967586
[7] 1353967587 1353967588 1353967589 1353967590
> j$day = structure(day, class=c("POSIXt", "POSIXct"))
> day
[1] "2012-11-26 14:06:20 PST" "2012-11-26 14:06:21 PST" "2012-11-26 14:06:22 PST"
[4] "2012-11-26 14:06:23 PST" "2012-11-26 14:06:24 PST" "2012-11-26 14:06:25 PST"
[7] "2012-11-26 14:06:26 PST" "2012-11-26 14:06:28 PST" "2012-11-26 14:06:29 PST"
[10] "2012-11-26 14:06:30 PST"