diff --git a/docs/install_stack_mac.html b/docs/install_stack_mac.html index 91ff81c..5f59f60 100644 --- a/docs/install_stack_mac.html +++ b/docs/install_stack_mac.html @@ -2758,17 +2758,19 @@

RStudio

Go to Tools > Global Options > Code > Editing and tick the following option:

Once the change is made you can try in the RStudio console Command + Shift + m to check if works.

+

Finally, let’s install a common R package that you used a lot in DSCI 100 by typing the following into the console inside RStudio:

+
install.packages("tidyverse")

IRkernel

The IRkernel package is needed to make R work in Jupyter notebooks. To enable this kernel in the notebooks, install by pasting the following command into the RStudio Console:

-
install.packages('IRkernel')
+
install.packages('IRkernel')

Next, open a terminal and type the following (you can’t use RStudio for this step since it doesn’t honor $PATH changes in ~/.bash_profile)

-
R -e "IRkernel::installspec()"
+
R -e "IRkernel::installspec()"

To see if you were successful, try running JupyterLab and check if you have a working R kernel. To launch JupyterLab, type the following in Terminal:

-
jupyter lab
+
jupyter lab

A browser should have launched and you should see a page that looks like the screenshot below. Now click on “R” notebook (circled in red on the screenshot below) to launch an JupyterLab with an R kernel.

@@ -2788,32 +2790,32 @@

IRkernel

by pasting a text snippet just before the first existing shortcut. Go ahead and create a new line just after the line that says "shortcuts": [ and paste the following:

-
        {
-            "command": "apputils:run-first-enabled",
-            "selector": "body",
-            "keys": ["Alt -"],
-            "args": {
-                "commands": [
-                    "console:replace-selection",
-                    "fileeditor:replace-selection",
-                    "notebook:replace-selection",
-                ],
-                "args": {"text": "<- "}
-            }
-        },
-        {
-            "command": "apputils:run-first-enabled",
-            "selector": "body",
-            "keys": ["Accel Shift M"],
-            "args": {
-                "commands": [
-                    "console:replace-selection",
-                    "fileeditor:replace-selection",
-                    "notebook:replace-selection",
-                ],
-                "args": {"text": "|> "}
-            }
-        },
+
        {
+            "command": "apputils:run-first-enabled",
+            "selector": "body",
+            "keys": ["Alt -"],
+            "args": {
+                "commands": [
+                    "console:replace-selection",
+                    "fileeditor:replace-selection",
+                    "notebook:replace-selection",
+                ],
+                "args": {"text": "<- "}
+            }
+        },
+        {
+            "command": "apputils:run-first-enabled",
+            "selector": "body",
+            "keys": ["Accel Shift M"],
+            "args": {
+                "commands": [
+                    "console:replace-selection",
+                    "fileeditor:replace-selection",
+                    "notebook:replace-selection",
+                ],
+                "args": {"text": "|> "}
+            }
+        },

After you have pasted this text, hit the small floppy disk in the top right (or Ctrl + s) to save the settings. @@ -2830,23 +2832,23 @@

Quarto CLI

The RStudio version that you have downloaded is already equipped with the last version of Quarto. You can check this by opening a new document in File -> New File -> Quarto Document.

Quarto can be used outside RStudio as well, this is why we are going to install Quarto CLI. Please, download the last version of Quarto CLI for MacOs.

After the installation finishes, close all the terminals you may have open. Then, open a new one and try running this command:

-
quarto --version
+
quarto --version

If the installation was successful you will read the output:

-
1.3.450
+
1.3.450

LaTeX

We will install the lightest possible version of LaTeX and its necessary packages as possible so that we can render Jupyter notebooks and R Markdown documents to html and PDF. If you have previously installed LaTeX, please uninstall it before proceeding with these instructions.

First, run the following command to make sure that /usr/local/bin is writable:

-
sudo chown -R $(whoami):admin /usr/local/bin
+
sudo chown -R $(whoami):admin /usr/local/bin

Note: You might be asked to enter your password during installation.

Now open RStudio and run the following commands to install the tinytex package and setup tinytex:

-
install.packages('tinytex')
-tinytex::install_tinytex()
+
install.packages('tinytex')
+tinytex::install_tinytex()

You can check that the installation is working by opening a terminal and asking for the version of latex:

-
latex --version
+
latex --version

You should see something like this if you were successful:

pdfTeX 3.141592653-2.6-1.40.25 (TeX Live 2023)
 kpathsea version 6.3.5
@@ -2863,28 +2865,28 @@ 

LaTeX

The above is all we need to have LaTeX work with R Markdown documents, however for Jupyter we need to add several more packages. Do this by opening a terminal and copying the following there press enter:

-
tlmgr install eurosym \
-  adjustbox \
-  caption \
-  collectbox \
-  enumitem \
-  environ \
-  fp \
-  jknapltx \
-  ms \
-  parskip \
-  pdfcol \
-  pgf \
-  rsfs \
-  soul \
-  tcolorbox \
-  titling \
-  trimspaces \
-  ucs \
-  ulem \
-  upquote \
-  lwarp \
-  oberdiek
+
tlmgr install eurosym \
+  adjustbox \
+  caption \
+  collectbox \
+  enumitem \
+  environ \
+  fp \
+  jknapltx \
+  ms \
+  parskip \
+  pdfcol \
+  pgf \
+  rsfs \
+  soul \
+  tcolorbox \
+  titling \
+  trimspaces \
+  ucs \
+  ulem \
+  upquote \
+  lwarp \
+  oberdiek

To test that your latex installation is working with jupyter notebooks, launch jupyter lab from a terminal and open either a new notebook or the same one you used to test IRkernel above. @@ -2897,14 +2899,14 @@

WebPDF export

and makes the exported PDF look similar to notebooks exported to HTML. This requires the pyppeteer package, which we can install as follows.

-
pip install "nbconvert[webpdf]"
-playwright install chromium
+
pip install "nbconvert[webpdf]"
+playwright install chromium

Try this by going to File -> Export notebook as... -> Export Notebook to WebPDF.

Docker

You will use Docker to create reproducible, sharable and shippable computing environments for your analyses. For this you will need a Docker account. You can sign up for a free one here.

After signing-up and signing into the Docker Store, go here: https://store.docker.com/editions/community/docker-ce-desktop-mac and click on the button “Mac with Intel chip” or “Mac with Apple chip”. Then follow the installation instructions on that screen to install the stable version.

To test if Docker is working, after installation open the Docker app by clicking on its icon (from Finder, Applications or Launchpad). Next open Terminal and type the following:

-
docker run hello-world
+
docker run hello-world

you should see something like this if you were successful:

Unable to find image 'hello-world:latest' locally
 latest: Pulling from library/hello-world
@@ -2953,7 +2955,7 @@ 

Post-installation notes

and to provide instructions for how you can troubleshoot any potential issues. To run this script, please execute the following command from your terminal.

-
bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)
+
bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)

The output from running the script will look something like this:

# DSCI 310 setup check 2024.1
 
@@ -3034,7 +3036,7 @@ 

Attributions

  • UBC STAT 545 licensed under the CC BY-NC 3.0
  • Software Carpentry
  • -
    +
    diff --git a/docs/install_stack_ubuntu.html b/docs/install_stack_ubuntu.html index 0566cf7..4d43816 100644 --- a/docs/install_stack_ubuntu.html +++ b/docs/install_stack_ubuntu.html @@ -2762,18 +2762,20 @@

    RStudio

    Go to Tools > Global Options > Code > Editing and tick the following option:

    Once the change is made you can try in the RStudio console Control + Shift + m to check if works.

    +

    Finally, let’s install a common R package that you used a lot in DSCI 100 by typing the following into the console inside RStudio:

    +
    install.packages("tidyverse")

    IRkernel

    The IRkernel package is needed to make R work in Jupyter notebooks. To enable this kernel in the notebooks, install by pasting the following command into the RStudio Console:

    -
    install.packages('IRkernel')
    -IRkernel::installspec()
    +
    install.packages('IRkernel')
    +IRkernel::installspec()

    Note: If you see an error message saying “jupyter-client has to be installed…”, close RStudio and run the following line from your terminal instead R -e "IRkernel::installspec()".

    To see if you were successful, try running JupyterLab and check if you have a working R kernel. To launch JupyterLab, type the following in a terminal:

    -
    jupyter lab
    +
    jupyter lab

    A browser should have launched and you should see a page that looks like the screenshot below. Now click on “R” notebook (circled in red on the screenshot below) to launch an JupyterLab with an R kernel.

    @@ -2793,32 +2795,32 @@

    IRkernel

    by pasting a text snippet just before the first existing shortcut. Go ahead and create a new line just after the line that says "shortcuts": [ and paste the following:

    -
            {
    -            "command": "apputils:run-first-enabled",
    -            "selector": "body",
    -            "keys": ["Alt -"],
    -            "args": {
    -                "commands": [
    -                    "console:replace-selection",
    -                    "fileeditor:replace-selection",
    -                    "notebook:replace-selection",
    -                ],
    -                "args": {"text": "<- "}
    -            }
    -        },
    -        {
    -            "command": "apputils:run-first-enabled",
    -            "selector": "body",
    -            "keys": ["Accel Shift M"],
    -            "args": {
    -                "commands": [
    -                    "console:replace-selection",
    -                    "fileeditor:replace-selection",
    -                    "notebook:replace-selection",
    -                ],
    -                "args": {"text": "|> "}
    -            }
    -        },
    +
            {
    +            "command": "apputils:run-first-enabled",
    +            "selector": "body",
    +            "keys": ["Alt -"],
    +            "args": {
    +                "commands": [
    +                    "console:replace-selection",
    +                    "fileeditor:replace-selection",
    +                    "notebook:replace-selection",
    +                ],
    +                "args": {"text": "<- "}
    +            }
    +        },
    +        {
    +            "command": "apputils:run-first-enabled",
    +            "selector": "body",
    +            "keys": ["Accel Shift M"],
    +            "args": {
    +                "commands": [
    +                    "console:replace-selection",
    +                    "fileeditor:replace-selection",
    +                    "notebook:replace-selection",
    +                ],
    +                "args": {"text": "|> "}
    +            }
    +        },

    After you have pasted this text, hit the small floppy disk in the top right (or Ctrl + s) to save the settings. @@ -2835,16 +2837,16 @@

    Quarto CLI

    The RStudio version that you have downloaded is already equipped with the last version of Quarto. You can check this by opening a new document in File -> New File -> Quarto Document.

    Quarto can be used outside RStudio as well, this is why we are going to install Quarto CLI. Please, download the last version of Quarto CLI for Linux.

    After the installation finishes, close all the terminals you may have open. Then, open a new one and try running this command:

    -
    quarto --version
    +
    quarto --version

    If the installation was successful you will read the output:

    -
    1.3.450
    +
    1.3.450

    LaTeX

    We will install the lightest possible version of LaTeX and its necessary packages as possible so that we can render Jupyter notebooks and R Markdown documents to html and PDF. If you have previously installed LaTeX, please uninstall it before proceeding with these instructions.

    First, open RStudio and run the following commands to install the tinytex package and setup tinytex:

    -
    install.packages('tinytex')
    -tinytex::install_tinytex()
    +
    install.packages('tinytex')
    +tinytex::install_tinytex()

    As recommended at the end of the installation, it is important to log out and in again for TinyTex to work properly (restarting the computer also works). @@ -2901,8 +2903,8 @@

    WebPDF export

    and makes the exported PDF look similar to notebooks exported to HTML. This requires the an additional package, which we can install as follows.

    -
    pip install "nbconvert[webpdf]"
    -playwright install chromium
    +
    pip install "nbconvert[webpdf]"
    +playwright install chromium

    Now you can try exporting by going to File -> Save and Export Notebook As... -> WebPDF.

    Docker

    @@ -2932,7 +2934,7 @@

    Post-installation notes

    and to provide instructions for how you can troubleshoot any potential issues. To run this script, please execute the following command from your terminal.

    -
    bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)
    +
    bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)

    The output from running the script will look something like this:

    # DSCI 310 setup check 2024.1
     
    @@ -3013,7 +3015,7 @@ 

    Attributions

  • UBC STAT 545 licensed under the CC BY-NC 3.0
  • Software Carpentry
  • -
    +
    diff --git a/docs/install_stack_windows.html b/docs/install_stack_windows.html index 2e8e932..9b3cecb 100644 --- a/docs/install_stack_windows.html +++ b/docs/install_stack_windows.html @@ -2884,6 +2884,8 @@

    RStudio

    Go to Tools > Global Options > Code > Editing and tick the following option:

    Once the change is made you can try in the RStudio console Ctrl + Shift + m to check if works.

    +

    Finally, let’s install a common R package that you used a lot in DSCI 100 by typing the following into the console inside RStudio:

    +
    install.packages("tidyverse")

    Rtools

    Windows users will also need to install Rtools, which will allow you to use external libraries. Go to http://cran.r-project.org/bin/windows/Rtools/ and download the latest version (e.g., rtools40v2-x86_64.exe). @@ -2893,19 +2895,19 @@

    Rtools

    To test if your installation was successful, open RStudio (restart it if you already have it open) and type the following into the Console:

    -
    install.packages("jsonlite", type = "source")
    +
    install.packages("jsonlite", type = "source")

    If the jsonlite package installs without errors, Rtools is setup correctly.

    IRkernel

    The IRkernel package is needed to make R work in Jupyter notebooks. To enable this kernel in the notebooks, install by pasting the following command into the RStudio Console:

    -
    install.packages('IRkernel')
    +
    install.packages('IRkernel')

    Next, open the Windows terminal and type the following (you can’t use RStudio for this step since it doesn’t honor $PATH changes)

    -
    R -e "IRkernel::installspec()"
    +
    R -e "IRkernel::installspec()"

    To see if you were successful, try running JupyterLab and check if you have a working R kernel. To launch the JupyterLab type the following in the terminal:

    -
    jupyter lab
    +
    jupyter lab

    A browser should have launched and you should see a page that looks like the screenshot below. Now click on “R” notebook (circled in red on the screenshot below) to launch an JupyterLab with an R kernel.

    Sometimes a kernel loads, but doesn’t work as expected. @@ -2924,32 +2926,32 @@

    IRkernel

    by pasting a text snippet just before the first existing shortcut. Go ahead and create a new line just after the line that says "shortcuts": [ and paste the following:

    -
            {
    -            "command": "apputils:run-first-enabled",
    -            "selector": "body",
    -            "keys": ["Alt -"],
    -            "args": {
    -                "commands": [
    -                    "console:replace-selection",
    -                    "fileeditor:replace-selection",
    -                    "notebook:replace-selection",
    -                ],
    -                "args": {"text": "<- "}
    -            }
    -        },
    -        {
    -            "command": "apputils:run-first-enabled",
    -            "selector": "body",
    -            "keys": ["Accel Shift M"],
    -            "args": {
    -                "commands": [
    -                    "console:replace-selection",
    -                    "fileeditor:replace-selection",
    -                    "notebook:replace-selection",
    -                ],
    -                "args": {"text": "|> "}
    -            }
    -        },
    +
            {
    +            "command": "apputils:run-first-enabled",
    +            "selector": "body",
    +            "keys": ["Alt -"],
    +            "args": {
    +                "commands": [
    +                    "console:replace-selection",
    +                    "fileeditor:replace-selection",
    +                    "notebook:replace-selection",
    +                ],
    +                "args": {"text": "<- "}
    +            }
    +        },
    +        {
    +            "command": "apputils:run-first-enabled",
    +            "selector": "body",
    +            "keys": ["Accel Shift M"],
    +            "args": {
    +                "commands": [
    +                    "console:replace-selection",
    +                    "fileeditor:replace-selection",
    +                    "notebook:replace-selection",
    +                ],
    +                "args": {"text": "|> "}
    +            }
    +        },

    After you have pasted this text, hit the small floppy disk in the top right (or Ctrl + s) to save the settings. @@ -2966,9 +2968,9 @@

    Quarto CLI

    The RStudio version that you have downloaded is already equipped with the last version of Quarto. You can check this by opening a new document in File -> New File -> Quarto Document.

    Quarto can be used outside RStudio as well, this is why we are going to install Quarto CLI. Please, download the last version of Quarto CLI for Windows.

    After the installation finishes, close all the terminals you may have open. Then, open a new one and try running this command:

    -
    quarto --version
    +
    quarto --version

    If the installation was successful you will read the output:

    -
    1.3.450
    +
    1.3.450

    Note: Pay attention that due to the Windows settings suggested in this installation you will always have to write quarto.cmd instead of quarto to run Quarto commands. Read more here.

    @@ -2977,8 +2979,8 @@

    LaTeX

    packages as possible so that we can render Jupyter notebooks and R Markdown documents to html and PDF. If you have previously installed LaTeX, please uninstall it before proceeding with these instructions.

    First, open RStudio and run the following commands to install the tinytex package and setup tinytex:

    -
    install.packages('tinytex')
    -tinytex::install_tinytex()
    +
    install.packages('tinytex')
    +tinytex::install_tinytex()

    Note that you might see two error messages regarding lua during the installation, you can safely ignore these, the installation will complete successfully after clicking “OK”.

    In order for Git Bash to be able to find the location of TinyTex, @@ -2987,7 +2989,7 @@

    LaTeX

    After doing that, you can check that the installation worked by opening a terminal and asking for the version of latex:

    -
    latex --version
    +
    latex --version

    You should see something like this if you were successful:

    pdfTeX 3.141592653-2.6-1.40.24 (TeX Live 2022)
     kpathsea version 6.3.4
    @@ -3005,28 +3007,28 @@ 

    LaTeX

    When you sign back in, install the additional LaTeX packages needed for Jupyter by pasting the following into the new terminal instance and press enter: by pasting the following:

    -
    tlmgr.bat install eurosym \
    -  adjustbox \
    -  caption \
    -  collectbox \
    -  enumitem \
    -  environ \
    -  fp \
    -  jknapltx \
    -  ms \
    -  parskip \
    -  pdfcol \
    -  pgf \
    -  rsfs \
    -  soul \
    -  tcolorbox \
    -  titling \
    -  trimspaces \
    -  ucs \
    -  ulem \
    -  upquote \
    -  lwarp \
    -  oberdiek
    +
    tlmgr.bat install eurosym \
    +  adjustbox \
    +  caption \
    +  collectbox \
    +  enumitem \
    +  environ \
    +  fp \
    +  jknapltx \
    +  ms \
    +  parskip \
    +  pdfcol \
    +  pgf \
    +  rsfs \
    +  soul \
    +  tcolorbox \
    +  titling \
    +  trimspaces \
    +  ucs \
    +  ulem \
    +  upquote \
    +  lwarp \
    +  oberdiek

    To test that your latex installation is working with jupyter notebooks, launch jupyter lab from a terminal and open either a new notebook or the same one you used to test IRkernel above. @@ -3039,8 +3041,8 @@

    WebPDF export

    and makes the exported PDF look similar to notebooks exported to HTML. This requires the pyppeteer package, which we can install by typing the following into Windows Terminal.

    -
    pip install "nbconvert[webpdf]"
    -playwright install chromium
    +
    pip install "nbconvert[webpdf]"
    +playwright install chromium

    Now try exporting a notebook by clicking File -> Save and Export Notebook As... -> WebPDF.

    Make

    @@ -3060,7 +3062,7 @@

    Make

    Next we need to add make’s bin folder to our PATH so that we can use he command make from the terminal (like we did with R earlier). Open the bash configuration file with VS Code again by pasting this into a terminal:

    -
    code ~/.bash_profile
    +
    code ~/.bash_profile

    And replace the section that reads:

    # Add R and Rscript to path
     export PATH="${R_DIR}:$PATH"
    @@ -3071,14 +3073,14 @@

    Make

    export PATH="/c/Users/${USERNAME}/make-4.3/bin:${R_DIR}:$PATH"

    Then save the file and exit VS Code. Launch a new terminal and run

    -
    make --version
    +
    make --version

    which should return something like

    -
    GNU Make 4.3
    -Built for Windows32
    -Copyright (C) 1988-2020 Free Software Foundation, Inc.
    -License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    -This is free software: you are free to change and redistribute it.
    -There is NO WARRANTY, to the extent permitted by law.
    +
    GNU Make 4.3
    +Built for Windows32
    +Copyright (C) 1988-2020 Free Software Foundation, Inc.
    +License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    +This is free software: you are free to change and redistribute it.
    +There is NO WARRANTY, to the extent permitted by law.

    Docker

    You will use Docker to create reproducible, sharable and shippable computing environments for your analyses. For this you will need a Docker account. You can sign up for a free one here.

    After signing-up and signing into the Docker Store, go here and click on the “Get Docker Desktop” button on the right hand side of the screen. Then follow the installation instructions on that screen to install the stable version.

    @@ -3133,7 +3135,7 @@

    Post-installation notes

    and to provide instructions for how you can troubleshoot any potential issues. To run this script, please execute the following command from your terminal.

    -
    bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)
    +
    bash <(curl -Ss https://raw.githubusercontent.com/UBC-DSCI/dsci-310-student/main/src/check_setup.sh)

    The output from running the script will look something like this:

    # DSCI 310 setup check 2024.1
     
    @@ -3214,7 +3216,7 @@ 

    Attributions

  • Numerical Methods - Getting started
  • RStudio - New native pipe operator
  • -
    +