-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.R
38 lines (34 loc) · 1.06 KB
/
app.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Define UI for miles per gallon app ----
ui <- fluidPage (
titlePanel("Miles Per Gallon"),
sidebarLayout (
sidebarPanel(),
mainPanel (
textOutput("myTextOutput"),
br(),
textOutput("myTextOutput2")
)
),
theme = bslib::bs_theme(version = "5")
)
# Define server logic to plot various variables against mpg ----
server <- function(input, output) {
#i <- installed.packages()
#session_ID <- reactive({ as.character(floor(runif(1)*1e20)) })
#output$myTextOutput <- renderPrint({
# paste0("session_ID = ", session_ID())
# })
#output$myTextOutput <- renderPrint({
# list.files()
# })
#output$myTextOutput <- renderPrint({
# cat(unname(sort(unique(i[,1]))), sep=" \n")
# })
output$myTextOutput <- renderPrint ({
system2('echo $(pwd)', stdout=TRUE, stderr=TRUE) # bash equivalent of getwd() # 'echo $(pwd)"/app"'
})
output$myTextOutput2 <- renderPrint ({
getwd()
})
}
shinyApp(ui, server)