plot.usmap match.arg(regions)中的错误:“ arg”必须为NULL或字符向量

时间:2019-11-26 17:11:09

标签: r vector plot null character

我正在尝试创建以下内容的基本热图。我不断收到此错误:

********Error in match.arg(regions) : 'arg' must be NULL or a character vector********

这是我为获得输出所做的一些工作。充其量我有一个完整的美国地图的空白模板,而最糟糕的是,我完全崩溃了RStudio:

summ$state <- as.character(summ$state)
summ$N <- as.character(summ$N)


summ$state <- fips(summ$state)
summ <- na.omit(summ)

data.frame(unclass(summary(summ)), check.names = FALSE, stringsAsFactors = FALSE)

plot_usmap(regions = "state", data = summ, values = "N", labels = FALSE, color = "red") +  
 scale_fill_continuous(name = "Deliveries", label = scales::comma) + 
  theme(legend.position = "right")

plot_usmap(data = summ, values = "N", include = c("state", "Month"))

Summ table snapshot

0 个答案:

没有答案