mirror of
https://github.com/spiritLHLS/one-click-installation-script.git
synced 2024-11-16 04:32:18 +08:00
Update R.sh
This commit is contained in:
parent
f49275cf22
commit
6aafaebfeb
30
R.sh
30
R.sh
|
@ -54,27 +54,27 @@ checkroot(){
|
|||
}
|
||||
|
||||
checkR(){
|
||||
if ! command -v R &> /dev/null
|
||||
then
|
||||
reading "R is not installed on this system. Do you want to install it? (y/n) " confirminstall
|
||||
echo ""
|
||||
if [ "$confirminstall" != "y" ]; then
|
||||
exit 0
|
||||
fi
|
||||
echo "R is not installed, install R language and dependent libraries..."
|
||||
${PACKAGE_INSTALL[int]} r-base libssl-dev libcurl4-openssl-dev libxml2-dev
|
||||
else
|
||||
echo "R is already installed, skip..."
|
||||
fi
|
||||
|
||||
if ! R -q -e "library('IRkernel')" &> /dev/null
|
||||
# if ! command -v R &> /dev/null
|
||||
# then
|
||||
# reading "R is not installed on this system. Do you want to install it? (y/n) " confirminstall
|
||||
# echo ""
|
||||
# if [ "$confirminstall" != "y" ]; then
|
||||
# exit 0
|
||||
# fi
|
||||
# echo "R is not installed, install R language and dependent libraries..."
|
||||
# ${PACKAGE_INSTALL[int]} r-base libssl-dev libcurl4-openssl-dev libxml2-dev
|
||||
# else
|
||||
# echo "R is already installed, skip..."
|
||||
# fi
|
||||
|
||||
source activate jupyter-env
|
||||
if ! Rscript -e "IRkernel::installspec()" &>/dev/null; then
|
||||
then
|
||||
reading "IRkernel is not installed on this system. Do you want to install it? (y/n) " confirminstall
|
||||
echo ""
|
||||
if [ "$confirminstall" != "y" ]; then
|
||||
exit 0
|
||||
fi
|
||||
source activate jupyter-env
|
||||
conda install -c r r-irkernel
|
||||
green "Installed IRkernel package and registered kernel"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user