我怎么能在Shiny中构建一个分层复选框选择面板,如下图所示?

有了这种选择清单:
choices<- c("I. Lorem ipsum","I.1. Lorem ipsum","I.1.1. Lorem ipsum","I.1.2. Lorem ipsum" ,
"I.2. Lorem ipsum","I.2.1 Lorem ipsum")
ui <-fluidPage(
checkboxGroupInput("variable","Variable:",choices)
)
server <- function(input, output, session) {
}
runApp(list(ui = ui, server = server))
Run Code Online (Sandbox Code Playgroud) 如何只有一个类别的图例部分?我试图搞砸override.aes没有成功.或者,可以将所需输出视为仅具有形状但不包含比例的图例.
ggplot(iris) +
geom_point(aes(x=Sepal.Width, y=Sepal.Length, color=Species, size=Sepal.Length))+
scale_size_continuous("Legend with \n only 1 circle ",range = c(5,10))+
guides(size = guide_legend( override.aes=list(range= c(1,5))))
Run Code Online (Sandbox Code Playgroud)
我试图获得的产品类型的说明:
点会缩放,但图例不会报告比例.
我正在尝试转换可在此处找到的加纳admin1 shapefile .我的最终目标是获得此问题中描述的TopoJSON .我在Linux机器上使用过这个命令:
ogr2ogr -f GeoJSON GHA_adm1.json GHA_adm1.shp
Run Code Online (Sandbox Code Playgroud)
它返回:
Unable to open datasource `GHA_adm1.shp' with the following drivers.
... here goes a long list of drivers...
Run Code Online (Sandbox Code Playgroud)
我做错了什么?我应该安装其他"司机"吗?但是怎么样?谢谢.