Skip to content

Error in as.vector(x, "character") : cannot coerce type 'closure' to vector of type 'character' #6

Description

@kamaulindhardt

When I run this code in the PNV tutorial I get the error: Error in as.vector(x, "character") : cannot coerce type 'closure' to vector of type 'character'

grid1km$cool.mixed.forest <- biome1km$predictions[, 
                        which(attr(biome1km$predictions, "dimnames")[[2]] == "cool.mixed.forest")]

library(devtools)
# install_github("envirometrix/plotKML", force = TRUE)
# install_github("envirometrix/plotKML", ref = "stars")
# install.packages("plotKML")
library(terra)
library(plotKML)



plotKML(grid1km["cool.mixed.forest"], 
        file.name = "Biome00k_M_cool.mixed.forest_T9998.kml", 
        folder.name = "cool.mixed.forest",
        raster_name = "Biome00k_M_cool.mixed.forest_T9998.png",  
        colour_scale=SAGA_pal[[10]])

What can be the problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions