ggplot2를 사용하여 xts 객체를 플롯하려하지만 오류가 발생합니다. 나는 다음과 같은 오류 얻을ggplot2를 사용하여 xts 객체 플로팅
ggplot(new_df, aes(x = index, y = value)) + geom_point()
:
Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 0, 5
을 내가 아주 확실하지 않다
dates <- c("2014-10-01", "2014-11-01", "2014-12-01", "2015-01-01", "2015-02-01")
value <- as.numeric(c(3, 4, 5, 6, 5))
new_df <- data_frame(dates, value)
new_df$dates <- as.Date(dates)
new_df <- as.xts(new_df[,-1], order.by = new_df$dates)
가 지금은 ggplot2 그것을 사용하여 플롯하려고 : 여기에 내가 뭘하는지입니다 내가 잘못하고있는 게 뭐지? 대문자로