DEV Community

Cover image for Data Science 101: Install miniconda and rstudio on a Mac
Guille Acosta
Guille Acosta

Posted on

1 1

Data Science 101: Install miniconda and rstudio on a Mac

So, you want to start your Data Science journey to become a Quant developer but you have a Mac and you're not sure how to configure your environment to install miniconda and rstudio? Stay tuned, this is your post.

Step 1: install Xcode Developer Tools by running sudo xcode-select --install (you need at least Xcode 11.4)

Step 2: download and install rstudio from its website but do not open it yet.

Step 3: donwload miniconda from its website and follow the wizard steps.

with miniconda installed now you have a new command to use: conda. The idea behind conda is to create isolated environments where you can install not only different pypi libraries (as venv or virtualenv does on Python) but also install different versions of Python (or R, etc). This way you can create a conda env with python 2.9 and other conda env with python 3.10 on it.

Now it's time to open the Terminal to create a new conda env for R but first, to get the latest version we need to set the right channel.

conda config --add channels conda-forge

then you need to set the priority level as follows:

conda config --set channel_priority strict

Note: to undo this changes you can check these answers

At the time I'm writing this post default channel does not have R version >= 4.0 you can check it by running conda search r-base

Now you are good to create a new env like this:

conda create -n r-env r -y

this way you are creating a conda env called r-env which by default got latest r installed and -y flag to accept the terms.

to activate this env you should run:

conda activate r-env

once you finish your job you can deactivate it by doing:
conda deactivate
and if you want to delete this env you can do it this way:
conda env remove -n r-env

Now you are good to open rstudio and start working from there.

Happy coding!

PS: if you are running R on a M1 Mac, check this page for more information.

Top comments (0)

Playwright CLI Flags Tutorial

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed: Zero in on just the tests that failed in your previous run
  • 2:34 --only-changed: Test only the spec files you've modified in git
  • 4:27 --repeat-each: Run tests multiple times to catch flaky behavior before it reaches production
  • 5:15 --forbid-only: Prevent accidental test.only commits from breaking your CI pipeline
  • 5:51 --ui --headed --workers 1: Debug visually with browser windows and sequential test execution

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

Watch Full Video 📹ī¸