GithubHelp home page GithubHelp logo

prostate's Introduction

RAPS

Risk After Prostate Surgery Shiny Web Application

We have developed a tool called RAPS (Risks After Prostate Surgery) that uses a man’s personal characteristics to estimate his probability of: a) prostate cancer recurrence, and b) dying without recurrence within 10 years of radical prostatectomy for his cancer.

Deployment Instructions

Clone the repo

You must clone the code base to work on it.

  git clone https://github.com/vsoch/prostate

or if you use ssh for github

  git clone [email protected]:vsoch/prostate.git

Note that the app is named on the server according to the folder name. The folder is called "prostate," so this would be deployed as http://predict.shinyapps.io/prostate. To fix this, and deploy as "raps," change the folder name:

  mv prostate raps 

Do not CD into the folder, you will work one level above it to deploy. It is most comfortable to work in the rstudio environment. If you have not installed it, do so, and run as so from the command line:

  rstudio

Once in R, you need to install devtools, shiny, and shiny apps.

  install.packages('devtools')
  install.packages('shiny')

  if (!require("devtools"))
    install.packages("devtools")
    devtools::install_github("rstudio/shinyapps")

If any installations don't work, it is recommended to find the source code on github, and install from source instead of a repository.

Setting up R

First, load the shinyapps, shiny, and devtools

  library('devtools')
  library('shiny')
  library('shinyapps')

You must first log into shinyapps.io to get the token and secret to use in R. Click on Account then Tokens and then Show. You will need to click show secret and copy to clipboard to copy the entire line of code and then copy paste into rstudio. Do that.

Make sure you are one folder above the app, you can check by doing "list.files()" and you should see "raps." When you are, the command to deploy is:

 deployApp("raps",account="predict")

The browser will open when it is finished.

Notes about the application

Shiny applications are usually required to have a server.R and ui.R. More advanced apps can roll their own html, meaning that we get rid of the ui.R and replace with an index.html file in the www folder. Note that it MUST be called this, and is expecting it. Thus, to make changes to the UI, you must change this file. Changes to the computation or the "R part" of the server should be changed in server.R.

prostate's People

Contributors

vsoch avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Forkers

nagyistge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.