Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

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

$
0
0

I am trying to create a basic heat map of the below. I keep getting this error:

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

This some of the work I've done to get an output. At best I have got a blank template of full us map and at worst, I completely crash 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


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>