【R言語】統計解析フリーソフトR 第4章【GNU R】at MATH【R言語】統計解析フリーソフトR 第4章【GNU R】 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト100:85 11/07/04 10:41:00.37 Rパッケージガイドブックを購入 xtsをインストールしたんですが データフレームをxtsにコンバートできません。 > x.xts<-as.xts(x) 以下にエラー as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format Zooオブジェクトに経由させることもできません > x.xts<-as.xts(read.zoo(x)) 以下にエラー xts(coredata(x), order.by = order.by, frequency = frequency, : order.by requires an appropriate time-based object データフレームの中身は 日付 株価 20040101 1500 20040102 1450 といった具合に2列のデータなのですが? 101:132人目の素数さん 11/07/04 11:05:02.37 >>100 ここに書くのではなくて、 それを書いた人に凸してみたら? > library(xts) 要求されたパッケージ zoo をロード中です > dat <- data.frame(日付=c(20040101,20040102),株価=c(1500,1450)) > dat 日付 株価 1 20040101 1500 2 20040102 1450 > as.xts(dat) 以下にエラー as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format > rownames(dat) <- c("2004-01-01","2004-01-02") > as.xts(dat) 日付 株価 2004-01-01 20040101 1500 2004-01-02 20040102 1450 まぁ、参考になれば。 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch