Skip to content

Instantly share code, notes, and snippets.

@jcheng5
Created October 26, 2012 17:27
Show Gist options
  • Select an option

  • Save jcheng5/3960092 to your computer and use it in GitHub Desktop.

Select an option

Save jcheng5/3960092 to your computer and use it in GitHub Desktop.
Simple matrixInput example
library(shiny)
shinyServer(function(input, output) {
output$plot <- reactivePlot(function() {
plot(input$foo)
})
})
library(shiny)
library(shinyIncubator)
shinyUI(pageWithSidebar(
headerPanel('Simple matrixInput example'),
sidebarPanel(
matrixInput('foo', 'Foo', head(cars))
),
mainPanel(
plotOutput(outputId='plot')
)
))
@yannrichet

Copy link
Copy Markdown

Hi Joe,
could you please tell us where to find "shinyIncubator" ?
I tried

options(repos=c(RStudio='http://rstudio.org/_packages', getOption('repos')))

without success...
Bes regards.

@yannrichet

Copy link
Copy Markdown

Ok, I finally found the shiny-incubator github, but I still don't know how to use it directly with install.packages(...), which could be convenient for updating with new shiny widgets from this incubator.
By the way, the matrixInput is really nice :)
Best,
Yann

@yannrichet

Copy link
Copy Markdown

library(devtools)
install_github('shiny-incubator', 'rstudio')

@Linyoyo

Linyoyo commented Jun 24, 2013

Copy link
Copy Markdown

Hi,Joe
I tried this example, but no graph is plotted.
I've run the following code to install package.

install.packages('shiny')
install.packages("devtools")
library(devtools)
install_github('shiny-incubator', 'rstudio')
library(shinyIncubator)

Could you tell me where the problem is?
Thank you!

@RAPLER

RAPLER commented Jul 17, 2013

Copy link
Copy Markdown

Hi Joe,
If I replace line 7 of ui.R by my own data, it does'nt work
Line 7 (changed): matrixInput('foo', 'Foo', matrix(c(1:6),nrow=2))
could you tell me what's wrong?
Thank's,
Claude

@FranGhelfi

Copy link
Copy Markdown

Hi. When I try to install the shinyIncubator package, I get a warning saying that it is not available for R version 3.2.1

Is there any updates or a more recent solution to editable data frames in shiny?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment