youngwoos / Doit_R

<Do it! 쉽게 배우는 R 데이터 분석> 저장소
212 stars 438 forks source link

ch11-1, 단계구분도 연습 중 #52

Closed sawsim92 closed 3 years ago

sawsim92 commented 3 years ago

rm(list = ls())

remove.packages(c("mapproj","ggiraphExtra", "tibble", "ggplot2")) install.packages(c("mapproj","ggiraphExtra", "tibble", "ggplot2"))

library(ggiraphExtra) library(ggplot2) library(tibble)

crime <- rownames_to_column(USArrests, var = "state") str(crime)

install.packages("maps") library(maps) states_map <- map_data("state") str(states_map)

ggChoropleth(data = crime, aes(fill = Murder, map_id = state), map = states_map)


Error in seq_len(nrow(data) - 1) : argument must be coercible to non-negative integer

아래와 같은 에러메세지가 뜹니다. Mac OS 사용중이며, Version 1.4.1103 사용중입니다..! 구글링 해보았는데 뭐가 문제인지 잘 모르겠어서요.. 답변 부탁드려요! 새해 복 많이 받으시구요,,