-
Notifications
You must be signed in to change notification settings - Fork 0
R Lang: notes on developing a shiny app
This assumes you are just interested in analytics, not a scientist or datapro.
(minimalistic, untested for syntax & requirements)
# load the shiny library (needs to be installed)
library(shiny)
# define the UI object and it's logic
ui <- fluidPage(
titlePanel("my title"),
sidebarPanel(),
mainPanel()
)
# define the server object and it's logic
server <- function(input,output) { }
# run the application
shinyApp(ui = ui, server = server)
Changing the working directory; once set commands default to this path depth
setwd("C:/developmentfolder/subfolder/ProjectX/")
Installing a package
install.packages(packageidname)
Installing a package from a specific repository (example value for repo)
install.packages(packageidname, repo="cran.rstudio.org")
As indicated before not all packages are ready to install as binary on any platform. It may be manual installation is required. This basically means you're not on a supported platform. Usually this only means a little bit of extra work.
fs
- a very complete filesystem library homepage here
ggplot2
- excellent for quickly deploying graphs homepage here
IPtoCountry
- map an IP to a country homepage here
library(fs)
read the files and folder on the current setpwd path
dir_ls()
read relative to setpwd path
dir_ls("subdir/subdir")
library(ggplot2)
not at at all here yet 👎
library(IPtoCountry)
This library requires a number of dependencies such as digest, backports, lattice
install.packages("digest",dependencies = TRUE)
install.packages("backports",dependencies = TRUE)
install.packages("lattice",dependencies = TRUE)
welcome to the blues, commandline.be at your service