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.
barplot() を使用して、時系列の xts オブジェクトをプロットしたいと考えています。ただし、x 軸に表示される日付形式は、日付形式ではなく数値です。数値を「2012-06-12」のような日付形式に変更するにはどうすればよいですか? コード例を次に示します。
x<-rnorm(100); y <- xts(x, Sys.Date()+1:100); barplot(y);
一般的な解決策は引数を使用することですnames.argが、コメントで述べたように、提供されたコードで問題を再現することはできません。
names.arg
barplot(y, names.arg=format(index(y), "%Y-%m-%d"))