Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
xts オブジェクトに変換すると、R は値を数値から文字列に変更するため、問題が発生します。
timeseries <- xts(timeseries,as.POSIXct(timeseries$Date)) timeseries <- timeseries[endpoints(timeseries,ts_ret_freq)]
これが問題のコードです。これはなぜですか?そうあるべきではありません。
前もって感謝します。
オブジェクトxtsは本質的にmatrixオブジェクトだからです。したがって、xts のすべての列は常に同じデータ型 (クラス) になります。
xts
matrix