更新、犯人は、私は今日まで、少し問題でggplotのRパッケージを使用しているreshape::rename
ggplot「名前の変更でエラー」
をオーバーライド自分rename
関数でした。今日、私は以前に動作していたコードを使用してエラーが発生し、それを最小限の動作例にデバッグするとエラーが発生します。
私はこれを行う場合:
library(ggplot2)
d<- data.frame(x=1:3,y=1:3)
ggplot(data=d) + geom_line(aes(x,y))
を次のエラーが返されます。
Error in rename(x, .base_to_ggplot) :
unused argument(s) (.base_to_ggplot)
トレースバックがある:
6: rename(x, .base_to_ggplot)
5: rename_aes(aes)
4: aes()
3: structure(list(data = data, layers = list(), scales = Scales$new(),
mapping = mapping, options = list(), coordinates = CoordCartesian$new(),
facet = FacetGrid$new(), plot_env = environment), class = "ggplot")
2: ggplot.data.frame(data = d, aes = c(x, y))
1: ggplot(data = d, aes = c(x, y))
エラーが使用しているすべてのオブジェクトを削除した後に発生しません。 rm(list=ls())
でも、このエラーの原因となっているオブジェクトが何であるのか、それはなぜですか?私はこれを理解できますか?
何が間違っているかも知れませんか?
清算してくれてありがとう。 –