Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| max_plots <- 5 | |
| ui <- fluidPage( | |
| headerPanel("Dynamic number of plots"), | |
| sidebarPanel( | |
| sliderInput("n", "Number of plots", value=1, min=1, max=5) | |
| ), |
| library(shiny) | |
| library(dplyr) | |
| library(lubridate) | |
| # Load libraries and functions needed to create SQLite databases. | |
| library(RSQLite) | |
| library(RSQLite.extfuns) | |
| saveSQLite <- function(data, name){ | |
| path <- dplyr:::db_location(filename=paste0(name, ".sqlite")) |
| ### An example of building a TensorFlow model from R using rPython ### | |
| # For this script you need to | |
| # 1. Have python 2.7 installed. | |
| # 2. Install the rPython package in R. | |
| # 3. Install Google's TensorFlow library as per these instructions: | |
| # http://www.tensorflow.org/get_started/os_setup.md#binary_installation | |
| ### Here is how to setup and run a trivial TensorFlow model ### | |
| # Load TensorFlow (I couldn't get this to work without setting sys.argv... ) |
Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.targetShiny Shiny.shinyapp.$inputValues acts like a store of state. I thought it would be fun to let vuejs react to changes in Shiny input values. This example is intentionally very simple to hopefully self-explain.
I have assembled vueR package, like d3r and reactR, to offer helpers for vuejs. For this example please install vueR, or just add tags$script(src = "https://unpkg.com/[email protected]") to the tagList().
devtools::install_github("timelyportfolio/vueR")`
vuejs is beautiful and works extremely well with R, since vuejs does not require and all-in contract to use it. I have played quite a bit with R htmltools and vuejs, but until today, I have not explored Shiny with vuejs. This earlier gist R Shiny and Vue Simple Example offers a very simple illustration of how Shiny and vuejs can be best friends. Now, let's build from that example and get a TreeView of a Shiny plot brush.
library(shiny)| SELECT | |
| *, | |
| pg_size_pretty(table_bytes) AS table, | |
| pg_size_pretty(index_bytes) AS index, | |
| pg_size_pretty(total_bytes) AS total | |
| FROM ( | |
| SELECT | |
| *, total_bytes - index_bytes - COALESCE(toast_bytes, 0) AS table_bytes | |
| FROM ( | |
| SELECT |