-
Notifications
You must be signed in to change notification settings - Fork 47
Week 8
Task: Generate a R-Script without Shiny components that is reactively updated, as the user progresses through their analysis for scriptable reproducibility of a final method within R
Method: Similar to the display.mode = "showcase" process of highlighting code that is utilized used in demo applications which will allow for reusing within R.
-
I'm still continuing to update the base graphics to ggplot2 graphics from last weeks tasks.
-
This is going to be an important feature for this project and a fundamental tenant of the R Project organization in the promotion of reproducible research in the field of open science and statistical computing. There is a R package, will I will implement: shinyAce. The shinyAce package enables Shiny application developers to use the Ace text editor in their applications. Ace is an embeddable code editor written in JavaScript. It matches the features and performance of native editors such as Sublime, Vim and TextMate. It can be easily embedded in any web page and JavaScript application. Ace is maintained as the primary editor for Cloud9 IDE and is the successor of the Mozilla Skywriter (Bespin) project.
- The key to transforming all of the
base
graphics intoggplot2
(publication-ready!) has been themelt
function in thereshape2
package. The trick with the melt function is acquiring the new column headers to be used in theaes()
parameter in the `ggplot function. ie x and y need to be defined similar to Var2 for the sample names and value for the expression values or other variations. I still need to add the original graphical features to the ggplot graphs but this is a good boiler template.
- I will need to transform the two selected columns for time and outcome for survival analysis into
as.integer
andas.double
. I may have to store the new columns as a reactive values in preparation for a revert button in case the user makes mistakes and needs to recover the original columns.