Skip to content

Conversation

@wanyuac
Copy link
Collaborator

@wanyuac wanyuac commented Jun 28, 2015

File added: app.R

This development is based on the update made by Areej this Saturday (26 April), where variable names have been changed. However, her codes for fluidRow have not been integrated in this change because I just saw this new update...Nonetheless, it would be a good way to improve the layout of UI.

My update includes:

  1. Combined ui.R and server.R into a single-file shiny application (app.R), which would be easier for maintenance and development.
  2. Rewrote server() by moving doPlotTree() outside of the function renderPlot(..). This is necessary because the download function needs to call doPlotTree for re-drawing the plot.
  3. Added a tab panel containing the download button and relevant options. I also added a textInput for specifying the file name, which will be more convenient than being asked for the file name every time after clicking the download button.
  4. Slightly adjusted the coding format on the basis of Areej's work to make it more consistent.
  5. Completed the function of downloading. The problem of file sizes has been fixed by specifying the unit for plotting in the output file. As for downloading the file into a local machine, I finally realised that the failure of generation a local file was not because of the R codes but due to the limitation of Rstudio's built-in browser. To run app.R properly, a user should use an external browser (click the button "Open in browser") such as Firefox, chrome and IE. I would raise this issue in the forum for Rstudio.

Finally, to run this application, the settings for folders should be:
XXX(the working folder)/
bin/
app.R
plotTree.R

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants