1
아래 데이터와 코드를 사용하여 g.3plot2에서 ggplot2를 사용하여 선 그래프를 그려보고자하지만 출력없이 geom_path: Each group consist of only one observation. Do you need to adjust the group aesthetic?
의 오류를 반환합니다. 나는이 문제를 해결하려면 어떻게 내가 축에 문자를 사용하여, 일반적으로ggplot2에 선 그래프 그리기
month <- c("01", "02", "03", "04", "05", "06", "07", "08" ,"09","10", "11" ,"12",NA)
yr.count <- c(357.500000 ,301.785714, 317.142857 ,283.071429 ,332.500000 ,333.285714 ,354.285714, 308.357143 ,272.142857 ,273.214286, 312.571429 ,337.714286,5.92857)
month.mean2 <- data.frame(month=month, yr.count=yr.count)
ggplot() + geom_line(data=month.mean2,
aes(x=month, y=as.numeric(yr.count)),
colour='red')