Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R水平反应轴标签_R_Shiny_Shiny Server_Shinydashboard - Fatal编程技术网

R水平反应轴标签

R水平反应轴标签,r,shiny,shiny-server,shinydashboard,R,Shiny,Shiny Server,Shinydashboard,我在R中有下面的代码,它创建了一个带有反应性标签的图。y标签是用户输入的选项名称(不是值),但它们当前垂直显示,而我需要水平显示 output$colm <- (renderPlot({barplot( as.numeric(input$vars), beside = TRUE, main = "Gap Analysis", xlab = "Mean Difference", horiz = TRUE, xlim = c(-1, 1), ylim = c(0,

我在R中有下面的代码,它创建了一个带有反应性标签的图。y标签是用户输入的选项名称(不是值),但它们当前垂直显示,而我需要水平显示

output$colm <- (renderPlot({barplot(
  as.numeric(input$vars),
  beside = TRUE,
  main = "Gap Analysis",
  xlab = "Mean Difference",
  horiz = TRUE,
  xlim = c(-1, 1),
  ylim = c(0, 5),
  ylab = names(gapChoices[input$vars == gapChoices]),
  col = cols,
  las = 1)}))
输出您正在使用的$colm

las = 1
这应该行得通。绘图时是否有任何错误?您可能需要使用

par(las=1)

请将代码直接张贴在侧面,而不是使用图像。