0

如何将mapview::popupTable()函数应用于 data.frame,包括列名中的多字节字符(使用 wondows OS)?

library(mapview)
data(atlStorms2005)
test1 <- atlStorms2005

test1@data$日本語 <- as.factor(c("mapview"))
mapview(test1)   
Error in gsub("</", "\\u003c/", payload, fixed = TRUE) : 
  input string 1 is invalid UTF-8
sessionInfo()
    R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=Japanese_Japan.932  LC_CTYPE=Japanese_Japan.932    LC_MONETARY=Japanese_Japan.932 LC_NUMERIC=C                  
[5] LC_TIME=Japanese_Japan.932    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] mapview_2.0.2      leaflet_1.1.0.9000

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.10      raster_2.5-8      magrittr_1.5      units_0.4-4       gdalUtils_2.0.1.7 munsell_0.4.3     viridisLite_0.2.0
 [8] colorspace_1.3-2  xtable_1.8-2      lattice_0.20-35   R6_2.2.1          foreach_1.4.3     udunits2_0.13     plyr_1.8.4       
[15] tools_3.4.0       webshot_0.4.0     rgdal_1.2-7       grid_3.4.0        png_0.1-7         R.oo_1.21.0       DBI_0.6-1        
[22] htmltools_0.3.6   crosstalk_1.0.1   iterators_1.0.8   digest_0.6.12     sf_0.4-3          shiny_1.0.3       base64enc_0.1-3  
[29] htmlwidgets_0.9   R.utils_2.5.0     codetools_0.2-15  mime_0.5          sp_1.2-4          compiler_3.4.0    scales_0.4.1     
[36] R.methodsS3_1.7.1 stats4_3.4.0      jsonlite_1.4      satellite_0.2.0   httpuv_1.3.3     
4

0 回答 0