I've some shiny app and I want to execute and to make it standalone application (it will be awesome if it will open via chrome).
I can't upload the app to the Net and I want that also co-workers without R studio or R
will use this app.
because of the security company - I can't download any software except R packages.
I saw here a few solution, but all of them included any software download.
I have done some research on this issue. The commenters are basically correct: you need the R binaries in some way, either a portable R or an R server. But there are solutions that allow it to bundle those with your code and hide the details from your users.
On option is to wrap your app along with
a portable R into a container application like Electron. The electron-quick-start project tries this.
The RInno package provides functions to bundle your app and R portable into an installer app. Every user runs the installer on their system once which will install your app, the packages and the code. But in the end users may not see the difference to other apps. They get a link in the start menu and that's it. I did that successfully. But it did not work out of the box. I had to adjust the output manually in several places.
A second container solution works with docker. That is what ShinyProxy does. See also this blog.
The package shinyShortcut (I quote) "will produce an executable file that runs the shiny app directly in the user's default browser".
Important to note: I haven't tested most of them. From reviewing the solutions I often get the feeling that these solutions might make releases somewhat complicated because there are always manual steps involved.
I'm trying to use Bokeh (v 12.13) in Zeppelin (0.7) on an AWS EMR cluster.
According to the documentation I've seen here, I should be able to use the notebook output handler. Git shows there was an error with this in 12.10 but this was resolved in 12.11 (https://github.com/bokeh/bokeh/issues/7179)
Trying to work around this by outputting to file, I get garbled HTML returned to the calling paragraph, and the show() task never completes - I need to manually stop it.
The answer is in the exception message:
no display hook installed for notebook type 'Zeppelin'
The Bokeh project itself does not provide or maintain Zeppelin support. It only exposes a general extension mechanism that other people can use to support different notebooks, if they choose. For Zeppelin to work, you'll need to install the third-party bkzep module:
https://github.com/zjffdu/bkzep
I have clone the source code from github and installed in the following way
http://docs.bokeh.org/en/latest/docs/quickstart.html#quick-installation
version
'0.11.0dev2-433-g96576eb'
Everything works fine, except for bokeh server
type in "bokeh server" in command line, get
bokeh-server: command not found
but "bokeh serve" does start the tornado server, which in documentation say Flask is used ?
run bokeh serve --show filename.py to run a specific py file.
Bokeh had an older server bokeh-server command, which was Flask based. Unfortunately it did not scale well or meet the performance we wanted to achieve. As of version 0.11 there is a new bokeh serve command that is based on Tornado and a pure websocket protocol. It is easier to deploy and use, but the changes needed to support the new server and protocol were incompatible in fundamental ways with the old server, so the old bokeh-server command has been completely removed as of version 0.11 and later.
Bokeh server examples can be found at:
https://github.com/bokeh/bokeh/tree/master/examples/app
I am trying to run the spectrogram.py example to work on bokeh. I get everything showing up in my browser, but the plots contain no data.
Here are the steps I did:
starting a server: bokeh-server
run the script (from bokeh/examples/embed/spectrogram/): python spectrogram.py
open page in Safari at http://127.0.0.1:5000/
I know that pyaudio is working from other scripts. Also, I added a print of the recorded data in spectrogram.py and I can see the responds to sounds I produce.
I tried both the conda installed bokeh as well as a self compiled from github.
Any suggestions?
About my setup:
bokeh.version = 0.9.1
Python 2.7.10 |Anaconda 2.1.0 (x86_64)| (default, May 28 2015, 17:04:42)
OSX Yosemite Version 10.10.2
Macbook Air 13-inch late 2010
First, should mention that the spectrogram demo does not rely on the bokeh-server. It polls a REST endpoint directly from the client. You can also check localhost:5000/data to make sure the audio data is actually getting served up.
In any case, there seems to be some cross-site validation that is failing for 127.0.0.1 for some reason. I specifically have to load it as localhost:5000 for it to work. It does not work from 127.0.0.1 for me.
If that fails, please make an issue on the Bokeh GH with any browser console output (and browser version).
I apologize if this has already been asked a different way but I couldn't find anything getting at what I wanted.
I am really getting into R from other packages (SPSS). As I learn about what truly can be done, I realize that there are additional "tools" that I need. This gets me to my question.
What setup do you have for developing R code? I can't see myself actually developing r packages anywhere in the near future, but I do see myself wanting to manage my r projects effeciently, as well as create reports and presentations in LaTeX.
For context, I develop my R code in Eclipse for Windows, but I have had a real hard time successfully setting up Latex/Sweave and Github plugins.
Lastly, do you develop code using Windows or something else?
Many thanks in advance for any insight you can lend.
Emacs has everything I commonly need:
ESS (for R),
AucTeX (for Latex),
similarly rich 'modes' for other languages I use (C++, make, shell, ...),
plus a lot of other modes you get quite used to as e.g. dired for directory/file browsing or org-mode as planner/to-do list,
the SVN integration is very good too
and there are probably a number of tools within Emacs I am now forgetting.
Works in text mode as well as graphical mode, and works essentially the same (incl ESS and AucTeX) on several operating systems (Linux mostly and Windows when I must). On Debian/Ubuntu all this is prepackaged and tends to work out of the box as well. For both Windows and OS X, Vincent Goulet has package very handy bundles, see here.
The 'daemon mode' is outstanding too -- I keep the same main Emacs session running and just connect and re-connect to it even when accessing the machine (via ssh or directly) from different computers.
Also see the EmacsWiki for more tips around Emacs.
Back to Emacs and R in particular. The R FAQ says it pretty well:
6.1 Is there Emacs support for R?
6.2 Should I run R from within Emacs?
and I like the affirmative and resounding answer to the second question: "Yes, definitely". I fully concur.
I'll second the suggestion that Emacs compliments R nicely, but let me share what the "killer feature" is for me.
Using Org-mode with Org-babel, I can write whole reports with inline graphs produced from R in raster and vector format which compiles seamlessly into a PDF report via latex. I can also view the graphs while editing, similar to a WYSIWYG editor.
I just wrapped up a major report with over 70 inline graphs with little effort, no editing external files, no issues maintaining naming between figures in my report and external files, or forgetting to recompile the latest version of a figure. Org & Babel does it all.
Org-mode:
http://orgmode.org/
Org-Babel:
http://orgmode.org/worg/org-contrib/babel/index.php
Example of inline R with Babel and PDF output, see the first example in multiple formats:
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.php
Enjoy!
This is probably more relevant for package development, but it is also worth mentioning the roxygen R package that allows in-source documentation of your code. Note that even though you can't see yourself developing R packages anywhere in the near future, a package can be a very handy way of grouping related functions you develop and maintain, consistently documenting the code and keeping track of updates, even if you do not plan to distribute it.
I use a mac, and my most important tools are:
the command line, for running R
git, for keeping track of changes
github for publishing my code, bug tracking and collaboration
textmate for writing R code
Has anyone tried RStudio? It's the shiny new editor for R.
I use windows... (don't say it).
I like Notepad++ and NPPtoR. Makes it pretty easy to send things back and forth.
I use Eclipse on Windows and Linux. I compile LaTeX code (with Sweave) on Linux and I haven't bothered yet to set up the whole process in Eclipse. I need to pdflatex and bibtex files several times anyway, so I just have a terminal window with the specific string of commands handy. I tried ESS and Eclipse and they're very similar in functionality (and in my opinion the best two editors out there).
I use Eclipse / StatEt on Windows, and it Rocks !. For LaTex/Sweave I use MikTex which works well for me. For help setting things up check out this document and this post.
Other Tools you may find useful include;
If you want to build R Packages on
Windows, then get the RTools
For
Creating Documents, you may want to
check out odfWeave,
LibreOffice (was OpenOffice) and
the MSOffice ODF plugin
I have also
dabbled with Git but also didn't get
very far on Windows, but that was a
while ago.
For Presentations in LaTex
I recomend Beamer
I use Eclipse for both R and Latex while working on research papers. The plugins for both are very mature now. The nice thing is that you don't have to switch application while writing papers. I used different combination before but I found this to be the best.
I just got home from our local R User meeting (find one near you here) and of the 20 or so people there, all of us used a different program or tool to write R code in. I think that goes to show the diversity of the tools used to write and edit R code is just as diverse as the R community itself.