有些人可以帮助我理解以下法典有什么错误。 我想利用两类彩色棕榈树,即单体和多壳体,在雕塑功能中进行大谈。 提前感谢。
shinyApp(
ui = fluidPage(
selectInput(inputId = "pal", label = "Select a sequential color palette",
choices = list(
`single hue` = list(
`Grays` = c("#F9F9F9", "#969696", "#1B1B1B"),
`Reds 3` = c("#F6F6F6", "#FF7078", "#69000C")),
`multi hue` = list(
`Dark mint` = c("#D1FBD4", "#579C97", "#0E3F5C"),
`YlOrRd` = c("#FFFFC8", "#F39300", "#7D0025"))
)
),
plotOutput("plot")
),
server = function(input, output) {
dat1 <- rnaturalearth::ne_countries(returnclass = "sf", scale = 110)
output$plot <- renderPlot({
plot(dat1["gdp_md_est"],
key.pos = 4,
axes = FALSE,
pal = colorRampPalette(input$pal),
key.width = lcm(1.3), key.length = 0.75
)
})
}
)