
Vetores Aumentados | 311
f
( x )
#> [1] "double"
attribute
s( x )
#> $tzone
#> [1] "UTC"
#>
#> $class
#> [1] "POSIXct" "POSIXt"
O atributo tzone é opcional. Ele controla como o tempo é impresso, não a qual tempo
absoluto ele se sefere:
attr( x, "tzone" ) <- "US/Pacific"
x
#> [1] "1969-12-31 17:00:00 PST"
attr
( x, "tzone") <- "US/Eastern"
x
#> [1] "1969-12-31 20:00:00 EST"
Há outro tipo de data-horas chamado POSIXlt. Esse é construído sobre listas nomeadas:
<- as.POSIXlt
f( y )
s( y )
#> $names
#> [1] "sec" "min" "hour" "mday" "mon" "year
#> [7] "wday" "yday" "isdst" "zone" "gmtoff"
#>
#> $class
#> [1] "POSIXlt" "POSIXt"