GithubHelp home page GithubHelp logo

londonr's Introduction

LondonR - Python for R Users

Environment Setup

Available initial enviroment setup files.

enviroment.yml
requirements.txt
conda env create -f environment.yml
conda activate londonr-env

Conda commands

conda env create -f environment.yml              # Create environment from environemnt.yml
conda activate my-env                      # Activate the environemnt
conda env export > environment.yml --no-builds   # Update the environemnt.yml
conda deactivate                                 # Deactivate the environment

# This file may be used to create an environment using the following steps:
# 1. Within the "base" conda
conda config --add channels conda-forge # Add conda-forge
# 
# 2. Create the virtual environment
conda create --name <your-env-name> --file <this file>
# 
# 3. Activate the environment
conda activate <your-env-name>
# 
# 4. Then install the packages
conda install --file requirements.txt   # Install requirements
# 

pip commands

env\Scripts\activate.bat         # Start the virtual environment (Windows for this)
pip install -r requirements.txt  # Install packages 
pip freeze > requirements.txt    # Write the installed packages to requirements.txt

Use R in Python Notebook

After activation of virtual environment, initialize R. Then install the following:

install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))

devtools::install_github('IRkernel/IRkernel', force=TRUE)

IRkernel::installspec()

install.packages("LDAvis")

quit()

Then right within the activated environment, install rpy2 for R and Python interaction.

conda install -c r rpy2

Next, start Jupyter Notebook.

jupyter notebook

londonr's People

Contributors

djoguns avatar

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.