Giter Site home page Giter Site logo

download packages about shinyvm HOT 7 CLOSED

nsh87 avatar nsh87 commented on September 19, 2024
download packages

from shinyvm.

Comments (7)

nsh87 avatar nsh87 commented on September 19, 2024

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.

Guiui21 avatar Guiui21 commented on September 19, 2024

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.

nsh87 avatar nsh87 commented on September 19, 2024

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.

nsh87 avatar nsh87 commented on September 19, 2024

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.

Guiui21 avatar Guiui21 commented on September 19, 2024

It works. Thank you so much !

Le 2015-02-18 à 13:53, Nikhil Haas [email protected] a écrit :

libcurl4-openssl-dev

from shinyvm.

Guiui21 avatar Guiui21 commented on September 19, 2024

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.

nsh87 avatar nsh87 commented on September 19, 2024

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)

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.