plotKML throws status 37 warning
Hi Jake My guess is that you don't have any file association on files with extension kml. I had the same problem on my old laptop with the same error message but on my new laptop your example works. With the old laptop I just lived with it. But since it works on my new laptop I checked my hunch that the problem is probably due to missing file association and that turned out to be true. Find the kml your script produced with your favourite file manager and right click on that, choose file properties and see which program is set to open kml files. On my old laptop it said unknown application whereas on my new laptop it said Google Earth. Hope that helps. Frede Aakmann T?gersen Specialist, M.Sc., Ph.D. Plant Performance & Modeling Technology & Service Solutions T +45 9730 5135 M +45 2547 6050 frtog at vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail disclaimer statement. Please refer to www.vestas.com/legal/notice If you have received this e-mail in error please contact the sender. -----Original Message----- From: R-sig-Geo [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Beaulieu, Jake Sent: 22. april 2015 20:14 To: r-sig-geo at r-project.org Subject: [R-sig-Geo] plotKML throws status 37 warning I am having trouble running the example code provided in the plotKML help file. The example is as follows: library(sp) library(rgdal) data(eberg) coordinates(eberg) <- ~X+Y proj4string(eberg) <- CRS("+init=epsg:31467") ## subset to 20 percent: eberg <- eberg[runif(nrow(eberg))<.1,] ## Not run: ## bubble type plot: plotKML(eberg["CLYMHT_A"]) Here is what happens when I run the code:
plotKML(eberg["CLYMHT_A"])
Plotting the first variable on the list KML file opened for writing... Reprojecting to +proj=longlat +datum=WGS84 ... Writing to KML... Closing eberg__CLYMHT_A__.kml access to 'C:\Users\jbeaulie\DOCUME~1\PLOTKM~1\EBERG_~1.KML' denied Warning message: running command 'open C:\Users\jbeaulie\DOCUME~1\PLOTKM~1\EBERG_~1.KML' had status 37 The kml file is written to the specified directory, but apparently R can't open the file from there. Any thoughts? Session info below.
sessionInfo()
R version 3.1.2 (2014-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] rgdal_0.9-1 plotKML_0.5-0 sp_1.0-17 loaded via a namespace (and not attached): [1] acepack_1.3-3.3 aqp_1.8 class_7.3-11 classInt_0.1-22 [5] cluster_1.15.3 colorRamps_2.3 colorspace_1.2-4 digest_0.6.8 [9] dismo_1.0-12 e1071_1.6-4 evaluate_0.5.5 FNN_1.1 [13] foreign_0.8-61 formatR_1.1 Formula_1.2-0 ggplot2_1.0.0 [17] grid_3.1.2 gstat_1.0-22 gtable_0.1.2 Hmisc_3.15-0 [21] htmltools_0.2.6 intervals_0.15.0 knitr_1.9 lattice_0.20-29 [25] latticeExtra_0.6-26 MASS_7.3-35 munsell_0.4.2 nnet_7.3-8 [29] pixmap_0.4-11 plotrix_3.5-11 plyr_1.8.1 proto_0.3-10 [33] raster_2.3-24 RColorBrewer_1.1-2 Rcpp_0.11.3 reshape_0.8.5 [37] reshape2_1.4.1 rmarkdown_0.3.11 rpart_4.1-8 RSAGA_0.93-6 [41] scales_0.2.4 spacetime_1.1-3 splines_3.1.2 stringr_0.6.2 [45] survival_2.37-7 tools_3.1.2 XML_3.98-1.1 xts_0.9-7 [49] yaml_2.1.13 zoo_1.7-11 Jake J Beaulieu, PhD United States Environmental Protection Agency Office of Research and Development National Risk Management Research Laboratory Water Supply and Water Resources Division Urban Waters Management Branch 26 W MLK Dr. MS 698 Cincinnati, OH 45268 Phone: 513-569-7842 _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo