Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
352 views
in Technique[技术] by (71.8m points)

r - Can i host a shiny app on a windows machine?

I've registered for the beta hosting. I've tried to follow the directions for creating the shinyapps/myapp folder on my widnows machine. I can run shiny apps locally. I've installed the node.js program shiny requires but I can get the config file? I think my error message requires python? Is there an easier way to host the shiny app on a windows machine? Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

a bit of a late answer: it is possible to host a shiny app on Windows.

use the following run.R script below, start it as a job on the windows machine. Do make sure that the port (below 1234) is open in the local firewall.

Enjoy!

require(shiny)
folder_address = 'H:/path to app'

x <- system("ipconfig", intern=TRUE)
z <- x[grep("IPv4", x)]
ip <- gsub(".*? ([[:digit:]])", "\1", z)
print(paste0("the Shiny Web application runs on: http://", ip, ":1234/"))

runApp(folder_address, launch.browser=FALSE, port = 1234, host = ip)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...