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