Skip to content

add install2.r as option for installing r packages #94

@eeholmes

Description

@eeholmes

user uses r-requirements.txt file

        ; if test -f "renv.lock" ; then echo "renv not set-up yet" & \
        ; elif test -f "r-requirements.txt" ; then echo "Using r-requirements.txt" & \
        r_packages=$( awk 'NF && $1 !~ /^#/ { gsub(/^[ \t]+|[ \t]+$/, ""); split($0, a, ","); for (i in a) print a[i] }' r-requirements.txt ) \
        && install2.r --error --skipinstalled -n "$NCPUS" $r_packages \

r-requirements.txt

# List of packages
sf, dplyr, ggplot2

# Visualization packages
plotly, shiny

# Machine learning
randomForest

this processes the r-requirements.txt file

$( awk 'NF && $1 !~ /^#/ { gsub(/^[ \t]+|[ \t]+$/, ""); split($0, a, ","); for (i in a) print a[i] }' r-requirements.txt 

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions