This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(R2jags) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(devtools) | |
| install_github('shinyExt','marcionicolau') | |
| require(shinyExt) | |
| shiny::runApp(system.file('examples/experimenter',package='shinyExt')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("ReadImages", "reshape", "ggplot2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # Image URL: | |
| allImageURLs <- c("http://media.charlesleifer.com/blog/photos/thumbnails/akira_940x700.jpg", | |
| "http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/402px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg", | |
| "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/441px-Official_portrait_of_Barack_Obama.jpg", | |
| "http://cache.boston.com/universal/site_graphics/blogs/bigpicture/obama_11_05/obama22_16604051.jpg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("ReadImages", "reshape", "ggplot2") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # Image URL: | |
| allImageURLs <- c("http://media.charlesleifer.com/blog/photos/thumbnails/akira_940x700.jpg", | |
| "http://upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg/402px-Mona_Lisa%2C_by_Leonardo_da_Vinci%2C_from_C2RMF_retouched.jpg", | |
| "http://upload.wikimedia.org/wikipedia/commons/thumb/e/e9/Official_portrait_of_Barack_Obama.jpg/441px-Official_portrait_of_Barack_Obama.jpg", | |
| "http://cache.boston.com/universal/site_graphics/blogs/bigpicture/obama_11_05/obama22_16604051.jpg", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .Rproj.user | |
| .Rhistory | |
| .RData | |
| *.Rproj | |
| long-* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| # load a very small projects file | |
| # Eventually the idea is to have a database link to SQLite or access | |
| projects=data.frame(pid=c(1,2,3,4,5),project=c("proj1","proj2","proj3","proj4","proj5")) | |
| # Define server logic | |
| shinyServer(function(input, output) { | |
| # if Projects -> View Projects is selected, this outputs the lists in dataframe projects |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(shiny) | |
| shinyServer(function(input, output) { | |
| output$intense <- reactivePrint(function() { | |
| if(input$panel==2){ | |
| Sys.sleep(10) | |
| return('Finished') | |
| }else({return(NULL)}) | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################### | |
| ## | |
| ## Attempt no 2 at building a shiny web app | |
| ## for AB Testing use - using global.R | |
| ## | |
| ## global.R - loading and defining variables for the global environment | |
| ## | |
| ############################################### | |
| # Pallette used in some charts as a general indicator color for better or worse that the control group |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Here a set of instructions corresponding to each code lesson is made into a dataset codelist | |
| ID=as.numeric() # id of code lesson | |
| instruct=as.character() # instructions for code lesson | |
| subhead=as.character() # subheading for code lesson | |
| i=1 | |
| ID[i]=i | |
| subhead[i]="Simple R Expressions: Addition" | |
| instruct[i]=paste('Try simple math','Type the command below','','1+1','',sep="\n") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #proxy { | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| display: none; | |
| } | |
| #notebook { | |
| position: absolute; | |
| width: 600px; |
OlderNewer