Function

コメント・参照等
FUN = f_convert_timezone.r
function (x) 
{
    print(x)
    print(str(unclass(as.POSIXlt(x))))
    print(class(x))
    tz <- OlsonNames()
    convertdf <- data.frame()
    if (inherits(x, "POSIXt")) {
        for (iii in seq(tz)) {
            buf <- as.POSIXlt(as.POSIXct(x), tz = tz[iii])
            convertdf[iii, 1] <- iii
            convertdf[iii, 2] <- tz[iii]
            convertdf[iii, 3] <- as.character(buf)
            convertdf[iii, 4] <- attr(buf, "tzone")[2]
            convertdf[iii, 5] <- attr(buf, "tzone")[3]
        }
    }
    else {
        stop("xはPOSIXtクラスの日時データを指定")
    }
    return(convertdf)
}