title: ggplot error in unit(x, default.units) : 'x' and 'units' must have length > 0
body: <p>I looked up "Data Visualization with ggplot2_Cheat Sheet_Rstudio _Maps" and tried to make Japanese version (but it didn't work as above).
  Please help me understand why the error "Error in unit(x,...." appears in this case.</p>
  
  <pre><code>library(ggplot2)
  library(mapdata)
  
  all = map_data("japan")
  unique(all[, 5])
  pref = c( #47 Japanese prefectures
    "Hokkaido",  "Aomori",    "Iwate",     "Miyagi",    "Akita",     "Yamagata",  "Fukushima",
    "Ibaraki",   "Tochigi",   "Gunma",     "Saitama",   "Chiba",     "Tokyo",     "Kanagawa", 
    "Niigata",   "Toyama",    "Ishikawa",  "Fukui",     "Yamanashi", "Nagano",    "Gifu",     
    "Shizuoka",  "Aichi",     "Mie",       "Shiga",     "Kyoto",     "Osaka",     "Hyogo",    
    "NARA",      "Wakayama",  "Tottori",   "Shimane",   "Okayama",   "Hiroshima", "Yamaguchi",
    "Tokushima", "Kagawa",    "Ehime",     "Kochi",     "Fukuoka",   "Saga",      "Nagasaki", 
    "Kumamoto",  "Oita",      "Miyazaki",  "Kagoshima", "Okinawa")
  
  number = sample(1:20, 47, replace=TRUE) #random number
  all_pref = as.data.frame(matrix(c(pref, number), 47, 2))
  
  JP = ggplot2::map_data("japan")
  
  DATA = data.frame(sample = as.numeric(all_pref$V2), 
                    japan = tolower(as.character(all_pref$V1)))
  
  MAP = JP
  k = ggplot(DATA, aes(fill = sample))
  
  k + 
    geom_map(aes(map_id = japan), map=MAP) + 
    expand_limits(x = MAP$long, y = MAP$lat)
  </code></pre>
  
  <blockquote>
    <p>Error in unit(x, default.units): 'x' and 'units' must have length > 0</p>
  </blockquote>