Comments (7)
The 'best practice' way would be to edit fabfile.py and create a function that installs that package. Then when you run fab vagrant setup_vagrant
that package will be installed. Take a look at the existing function sub_install_rmarkdown()
for an example. Based on the rCharts documentation for how to install, your new function will probably look something like this:
def sub_install_rCharts():
"""Install rCharts, for publishing interactive JavaScript visuals, via GitHub."""
sudo('R -e "require(devtools); install_github(\'ramnathv/rCharts\')"')
The install procedure is verbatim from their documentation. Make sure you actually call that function somewhere in fabfile.py, and in your server.R file you should load the rCharts library in like any other R library, probably in such a way where it gets loaded once and not every time a user connects. See here.
from shinyvm.
Thanks, but I got this error:
"""Install rCharts, for publishing interactive JavaScript visuals, via GitHub."""
^
IndentationError: expected an indented block
Do you have any idea ?
Le 2015-02-18 à 13:21, Nikhil Haas [email protected] a écrit :
Closed #3.
—
Reply to this email directly or view it on GitHub.
from shinyvm.
Yup, the indentation of Python is wrong so it's complaining. You might need to retype the function by hand. I'm guessing you don't have devtools installed either, so you need to install that also, just like with the Rmarkdown example. I'll leave this ticket open for now, you can close it once you get things working.
from shinyvm.
Here, this will get things working. The package you are trying to install has a lot of dependencies which aren't installed by default. In fabfile.py add 'libcurl4-openssl-dev'
to the list of INSTALLED_PACKAGES
. Then the function to install rCharts should look like this:
def sub_install_rCharts():
"""Install rCharts, for publishing interactive JavaScript visuals, via GitHub."""
sudo('R -e "install.packages(\'devtools\', '
'repos=\'http://cran.rstudio.com/\', dependencies=TRUE)"')
sudo('R -e "install.packages(\'plyr\', '
'repos=\'http://cran.rstudio.com/\', dependencies=TRUE)"')
sudo('R -e "require(devtools); install_github(\'ramnathv/rCharts\')"')
from shinyvm.
It works. Thank you so much !
Le 2015-02-18 à 13:53, Nikhil Haas [email protected] a écrit :
libcurl4-openssl-dev
from shinyvm.
Hi,
Another quick question, is there any pre-configure static IP address on the VM ?
I’m trying to use a static IP on my VM to put my pages online, and not only on a localhost.
Thanks.
Le 2015-02-18 à 13:53, Nikhil Haas [email protected] a écrit :
Here, this will get things working. The package you are trying to install has a lot of dependencies which aren't installed by default. In fabfile.py add 'libcurl4-openssl-dev' to the list of INSTALLED_PACKAGES. Then the function to install rCharts should look like this:
def sub_install_rCharts():
"""Install rCharts, for publishing interactive JavaScript visuals, via GitHub."""
sudo('R -e "install.packages('devtools', '
'repos='http://cran.rstudio.com/\', dependencies=TRUE)"')
sudo('R -e "install.packages('plyr', '
'repos='http://cran.rstudio.com/\', dependencies=TRUE)"')
sudo('R -e "require(devtools); install_github('ramnathv/rCharts')"')
—
Reply to this email directly or view it on GitHub.
from shinyvm.
Look in Vagrantfile, it has all the settings for the VM, including the IP, but I'm not sure why you'd need to change that unless it conflicts with your server's IP. HTTP requests are made over port 80, Shiny is listening on port 3838. If you want to make this accessible at some public server you need to forward port 80 on the server to 3838 of the VM. You can change the port forwarding settings in Vagrantfile. As long as nothing else on your server is listening on port 80 that will work, then just visit http://mypublicserver.
On Feb 23, 2015, at 7:03 AM, Guiui21 [email protected] wrote:
Hi,
Another quick question, is there any pre-configure static IP address on the VM ?
I’m trying to use a static IP on my VM to put my pages online, and not only on a localhost.Thanks.
Le 2015-02-18 à 13:53, Nikhil Haas [email protected] a écrit :
Here, this will get things working. The package you are trying to install has a lot of dependencies which aren't installed by default. In fabfile.py add 'libcurl4-openssl-dev' to the list of INSTALLED_PACKAGES. Then the function to install rCharts should look like this:
def sub_install_rCharts():
"""Install rCharts, for publishing interactive JavaScript visuals, via GitHub."""
sudo('R -e "install.packages('devtools', '
'repos='http://cran.rstudio.com/\', dependencies=TRUE)"')
sudo('R -e "install.packages('plyr', '
'repos='http://cran.rstudio.com/\', dependencies=TRUE)"')
sudo('R -e "require(devtools); install_github('ramnathv/rCharts')"')
—
Reply to this email directly or view it on GitHub.—
Reply to this email directly or view it on GitHub.
from shinyvm.
Related Issues (11)
- Error during installation with fab script HOT 2
- ValueError during the "fab vagrant setup_vagrant" step HOT 1
- Upgrade Trusty -> Focal
- Dependency updates?
- Error after fab vagrant setup_vagrant HOT 3
- Can't get R packages to install in the install HOT 6
- `Shared folders HOT 4
- Error when running fab vagrant setup_vagrant HOT 1
- ValueError: in step fab vagrant setup_vagrant HOT 1
- Error while running `fab vagrant setup_vagrant` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinyvm.