Sample codes for the hydrology course offered at Princeton University
For Mac users, we highly recommend installing Anaconda (Python 2.7 version) as you can use its package manager (called “conda”) to easily install and update packages . For example, open your terminal window and type the following commands to install the above mentioned packages:
conda install R
conda install rpy2
For Windows users, you may need to install these packages separately .
pip install SomePackage-1.0-py2.py3-none-any.whl
to install the downloaded .whl files. Please make sure that you have the latest version of pip. You can upgrade pip using python -m pip install --upgrade pip
.advanced and system setting
-> environment variables
C:\Program Files\R\R-3.0.2\bin\x64
to the pathR_HOME
system variable with a value similar to C:\Program Files\R\R-3.2.0
R_USER
system variable with your user name C:\Users\"your user name"
R_LIBS_USER
system variable with a path to the folder where external R packages are/will be installed. You can find the path through the command .libPaths()
in the R
environment.git clone git@github.com:XiaogangHe/Princeton-CEE306.git
jupyter notebook
Bookmark these cheat sheets:
Ask questions related to Python on StackExchange stats.stackexchange.com – python.