R Hello, World!
Hello, R!
Iniciando com a linguagem R!
print("Hello, World!")
Linha de comando
Criação de ambiente virtual Python:
# Create environment
py -3 -m venv ~/environments/rlang
# Activate environment
source ~/environments/rlang/Scripts/activate
Instalação console interativo Radian:
pip install --upgrade pip
pip install radian
Instalação de Pacotes:
# create local user library path (not present by default)
dir.create(path = Sys.getenv("R_LIBS_USER"), showWarnings = FALSE, recursive = TRUE)
# install to local user library path
install.packages("renv", lib = Sys.getenv("R_LIBS_USER"), repos = "https://cran.rstudio.com/")
Executar script R pela linha de comando:
# R code
c://'Program Files'/R/R-4.1.3/bin/Rscript.exe -e "cat('this is a test')"
# R file
c://'Program Files'/R/R-4.1.3/bin/Rscript.exe -e "source('hello.R')"