R 闪亮的应用程序只是浏览器窗口的一半
我最近开始学习Shiny,正在开发我的第一个练习应用程序。出于某种原因,我的应用程序并没有占据整个浏览器窗口,但已经被截去了一半。页面仍然可以向下滚动以查看其余的输出,但由于某些原因,折叠次数较高。下面是我的代码:R 闪亮的应用程序只是浏览器窗口的一半,r,shiny,R,Shiny,我最近开始学习Shiny,正在开发我的第一个练习应用程序。出于某种原因,我的应用程序并没有占据整个浏览器窗口,但已经被截去了一半。页面仍然可以向下滚动以查看其余的输出,但由于某些原因,折叠次数较高。下面是我的代码: library(foreign) library(dplyr) library(shiny) library(dplyr) library(ggplot2) library(shinythemes) thesis <- read.csv("thesis.csv", strin
library(foreign)
library(dplyr)
library(shiny)
library(dplyr)
library(ggplot2)
library(shinythemes)
thesis <- read.csv("thesis.csv", stringsAsFactors = T)
ui <- fluidPage(theme = shinytheme("cerulean"),
# Application title
titlePanel("Annual Prices by City"),
# Sidebar with choice selected
sidebarLayout(
sidebarPanel(
selectInput("city","City",as.character(thesis$city)),
tableOutput("table")
),
# Show a time series line plot
mainPanel(
textOutput("cityheader"),
plotOutput("plot", width="100%")
)
)
)
server <- function(input, output, session) {
df <- reactive({
thesis %>%
select(city, year, price) %>%
filter(city == input$city)
})
output$plot <- renderPlot({
ggplot(df(), aes(x=year, y=price)) +
labs(title=input$city, x="Year", y="Annual Avg Price") +
geom_line(col="blue")
}, height=400, width = 700)
output$table <- renderTable({
df()
})
output$cityheader <- renderText({
input$city
})
}
shinyApp(ui=ui,server=server)
库(外文)
图书馆(dplyr)
图书馆(闪亮)
图书馆(dplyr)
图书馆(GG2)
图书馆(shinythemes)
论文我也有同样的问题,试试看
shinyApp(ui = ui, server = server, options = list(height = 1080))
Rstudio内部看起来如何?我更新了一个Rstudio屏幕截图。这就解决了它。谢谢