# \donttest{
library(KMLtoSHAPE)
# Example usage:
data_kml <- system.file("extdata", "testkml.kml", package = "KMLtoSHAPE")
outputShape <- file.path(tempdir(), "shapedata.shp")
# Delete existing shapefile if it exists
if(file.exists(outputShape)) file.remove(outputShape)
# Specify attribute names
attribute_names <- c("pH", "EC", "OC", "N", "P", "K")
# convert kml to shapefile
test_data<-kml_to_shape_gen(data_kml, outputShape,attribute_names)
# }
Run the code above in your browser using DataLab