我寻求有关如何更改附加地图上sp.text标签的fontsize和fontcolor的帮助。避免标签重叠,并提高可读性。
地图制作如下。如果需要,可以在此处下载spacepolypolygonsdataframe'mymap' 。
trellis.par.set()无法解决我的问题,我使用不正确吗?
library(sp)
library(latticeExtra)
# Create list object for sp.layout (Got these functions here on stackoverflow, thank you owner)
sp.label <- function(x, label) {list("sp.text", coordinates(x), label)}
NUMB.sp.label <- function(x) {sp.label(x, as.vector(x@data$NUMB))}
make.NUMB.sp.label <- function(x) {do.call("list", NUMB.sp.label(x))}
# Spplot
tps <- list(fontsize=list(text=5), fontcolor=list(text="green"))
trellis.par.set(tps)
spplot(mymap, "indic",
col.regions=c("#D3D3D3","#A9A9A9"),
sp.layout = make.NUMB.sp.label(mymap),
cex = 0.5,
bg = "white", col="light grey", border="light grey")
Run Code Online (Sandbox Code Playgroud)

我正在创建一个闪亮的应用程序,在他选择了他感兴趣的日期范围(= x轴的范围)后向用户显示ggplot.所以我想我需要定义一个被动数据对象(正确吗?).
ggplot中有一些子集.R告诉我反应数据对象不是子集.在我对ggplot的新手理解中,必须在geom_bar(),geom_line()语句中完成子集化,以获得我想要的图形.
如何在为图形生成颜色时引用因子类别?谢谢!
A = c(3, 4, 3, 5)
B = c(2, 2, 1, 4)
Z = c(1, 2, 1, 2)
R = c(-2, -1, -3, 0)
S = c(7,7,7,9)
mydata = data.frame(cbind(A,B,Z,R,S))
dates = c("2014-01-01","2014-02-01","2014-03-01","2014-04-01")
mydata$date = as.Date(dates)
mydata.m = melt(mydata,id="date")
names(mydata.m) = c("variable", "category","value")
Run Code Online (Sandbox Code Playgroud)
data.r = reactive({
a = subset(mydata.m, variable %in% input$daterange)
return(a)
})
Run Code Online (Sandbox Code Playgroud)
output$myplot = renderPlot({
# ggplot with proper reference to reactive function <<data.r()>>
s = ggplot(data.r(), aes(x=variable, …Run Code Online (Sandbox Code Playgroud)如何查看Ubuntu系统上安装的闪亮服务器的版本?
背景:在Ubuntu14 32位虚拟机上安装了shiny-server(即从源代码构建).它已启动并运行,但尚未运行良好,并且为了搜索我的问题的解决方案,我需要知道闪亮的服务器版本.