This consists of a "Rosetta Stone" of code syntax between R, Python, and Julia. The aim is to help those who are proficient in one language easily translate their code/understanding to another.
Action | R code | Python code | Julia code |
---|---|---|---|
execute script from REPL | source('script.R') |
execfile('script.py') |
include("script.jl") |
install a package | install.packages("pkg") |
[from OS terminal]: pip install pkg |
Pkg.add("pkg") |
load a package | library(pkg) or require(pkg) |
import pkg |
using pkg |