How to create a conda or mamba environment for R programming to enhance reproducibility (CC230)

  Рет қаралды 6,788

Riffomonas Project

Riffomonas Project

Күн бұрын

Пікірлер: 33
@stretch8390
@stretch8390 2 жыл бұрын
You are a productivity machine. I don't know how you make time for all these videos but thank you!
@Riffomonas
@Riffomonas 2 жыл бұрын
My pleasure! Thanks for watching 🤓
@arslantariqable
@arslantariqable 2 жыл бұрын
I knew the conda environment and its usefulness regarding tools installation, but I didn't know about its use for reproducibility for data analysis. Thanks for giving such great information. Keep it up. 👍❤️❤️
@Riffomonas
@Riffomonas 2 жыл бұрын
Wonderful - I’m glad you got something out of the video! 🤓
@MLesp
@MLesp 6 ай бұрын
This is the best explanation ever! Great job!
@exotoxinslab
@exotoxinslab Жыл бұрын
This is one of the best videos for reproducibility I have seen! 🥳 Thank you so much! I was about to give up the use of several programming languages in our projects, because a lot of blogs report that R is not compatible with Conda environments 🙄. And thank you for the warning about mixing renv with conda... I was about to do that!
@marbacc
@marbacc Жыл бұрын
Thank you for the information. By the way I stopped and paused the video on 7:02 and forgot to close it. After a few hours I come back and I thought I was watching Mr. Robot.
@Riffomonas
@Riffomonas Жыл бұрын
Hah!
@dmalarekable
@dmalarekable 2 жыл бұрын
It is great that you show us not only how to analize the data in RStudio but also more complicated things like environments and version control. Thank you for that. I wrote a few custom functions for my microbial data analyses that I use with different datasets and I think that it would be interesting to see how to make custom R package and post it online. Or maybe there is another way to use custom functions in different projects in R?
@Riffomonas
@Riffomonas 2 жыл бұрын
I love integrating different concepts! I’ve thought about putting up a package through a series. Let me see what I can come up with
@kylelima6768
@kylelima6768 2 жыл бұрын
@@Riffomonas I think that would be a great series.
@caseyj1144
@caseyj1144 2 жыл бұрын
you can automatically create a .yaml file to share the environment using conda ```conda env export --name ENVNAME > envname.yml```
@Riffomonas
@Riffomonas 2 жыл бұрын
Thanks Casey! Yeah that's available. I find that is a less desirable approach because the output file is so verbose. When I just ran it the yml file was 350+ lines long! I prefer the compact format where I can quickly look at what is being installed. Your suggested approach is great if you don't plan on actually looking at the contents of the file.
@charleslehnen9636
@charleslehnen9636 Жыл бұрын
@@Riffomonas not sure if this is an identical output from the one produced by CaseyJ's method or not, but I always use ```conda list --export > requirements.txt```
@SriramaBhamidipati
@SriramaBhamidipati 2 жыл бұрын
Thank you for this.
@Riffomonas
@Riffomonas 2 жыл бұрын
My pleasure! I’m glad you found it useful 🤓
@tolga1292
@tolga1292 10 ай бұрын
Great vid! How to activate the conda environment inside RStudio? So without calling RStudio from terminal.
@Riffomonas
@Riffomonas 5 ай бұрын
I would love to know too!
@zhaoxiang3998
@zhaoxiang3998 Жыл бұрын
Very clear video. Just one question, if we are not recommended to install packages in R, everytime we need one package we need to quit R to install it via mamba? then the data analysis process can always be interrupted? any solution for this?
@TURALOWEN
@TURALOWEN Жыл бұрын
Thank you for the video! Quick question: whenever I try to create env with both tidyverse and tidymodels, it says "Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort." and then tries to solve it, but never manages to solve it. Do you have a solution for this? Thank you!
@ahmed007Jaber
@ahmed007Jaber 2 жыл бұрын
Hey Pat, I am having this issue and wonder what you suggest. been experiencing a weird issue. when I am using regex with arabic text and mutate a column I am getting nulls the issue I used the same approach with the same data set on my other laptop and it worked like a charm an addition to this grepl works fine in the faulty laptop any ideas? I am trying to figure out a way that copy: rstudio confirgrations locale configrations and implement those into my "faulty" laptop
@Riffomonas
@Riffomonas 2 жыл бұрын
Sorry I’m not really sure. A google search got me this which I wonder if it will be helpful stackoverflow.com/questions/66586955/r-using-str-detect-function-with-arabic-text-or-other-right-to-left-languages
@user-rf9ow8ck2l
@user-rf9ow8ck2l Ай бұрын
One of the frustrating limitations of the conda approach for R is that only a fraction of the packages in CRAN are compiled and installable via conda. Other packages are not in CRAN and its not clear how to install those via conda. Any thoughts on this?
@Riffomonas
@Riffomonas Ай бұрын
I have found that the major packages are available in one of the conda collections. It's not a horrible process to contribute a conda package if you need to. This SO link is somewhat helpful stackoverflow.com/questions/52061664/install-r-package-from-github-using-conda
@caseyj1144
@caseyj1144 2 жыл бұрын
I'm a bit lost on what directory the .Rprofile file should be in to correct the issue with tidyverse. (Also, I am working on a Windows computer and writing out the notes that are different if you do want to make a version for Windows I'd be happy to send them)
@caseyj1144
@caseyj1144 2 жыл бұрын
anyone else - I just tried saving it in the general miniconda3/envs/ folder and it worked
@Riffomonas
@Riffomonas 2 жыл бұрын
I'd think the .Rprofile file should be in the project root directory. Putting it in miniconda3/envs/ won't be portable if you share your code with someone else.
@filhodaanaedozizin4331
@filhodaanaedozizin4331 Жыл бұрын
Thank you, this is very useful indeed. Is there a way to add RStudio into dependencies? I tried with "rstudio-desktop" but it gave me "nothing provides requested rstudio-desktop". Same message when I tried to define the python version as "python=2.7" under dependencies.
@Riffomonas
@Riffomonas Жыл бұрын
Are you possibly using a windows computer? It looks like the rstudio-desktop conda package only works on mac or linux. I suspect most people use a different IDE from RStudio if they're using conda environments anaconda.org/conda-forge/rstudio-desktop For python can you maybe try removing the version number and see what version it selects based on the other dependencies?
@filhodaanaedozizin4331
@filhodaanaedozizin4331 Жыл бұрын
@@Riffomonas thanks! I'm using Mac (M1) and don't have any RStudio installed either. The rstudio-desktop should have worked, but for whatever reason it didn't. Full disclosure, this is a brand new laptop and I installed miniconda. It could be the I have something missing in my laptop, but the error message doesn't say that. For python, if I don't give the version number it will use the (base) version.
@filhodaanaedozizin4331
@filhodaanaedozizin4331 Жыл бұрын
Would it make sense for me to activate my R env and, then, install RStudio from the downloadable file from their website? It's not critical that I define it in the yml dependencies, but it needs to run with what's installed in the R env
@Riffomonas
@Riffomonas Жыл бұрын
I don't recommend using renv with conda. To get Rstudio to use your conda environment, you can go to your terminal and navigate to your project directory. From there, you can type "open project.Rproj" or "open my_file.R" and Rstudio will launch using your environment. To double check, you can run .libPaths() at the R prompt and you should see the path to your environment
@filhodaanaedozizin4331
@filhodaanaedozizin4331 Жыл бұрын
@@Riffomonas thanks again. Because I'm using Apple M1 silicon, I (painfully) learned that I first need to install miniforge (miniconda and anaconda apparently won't work properly), then I have to create env that run with compatibility with Intel osx-64 (CONDA_SUBDIR=osx-64 mamba env create -f config_env_r.yml). By following these steps, my M1 Macbook doesn't have compatibility issues with packages developed for Intel chip.
Using renv to track the version of your packages in R (CC229)
20:33
Riffomonas Project
Рет қаралды 7 М.
Using paths in R and why you shouldn't be using setwd (CC179)
15:14
Riffomonas Project
Рет қаралды 4,5 М.
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 9 МЛН
Angry Sigma Dog 🤣🤣 Aayush #momson #memes #funny #comedy
00:16
ASquare Crew
Рет қаралды 48 МЛН
МЕБЕЛЬ ВЫДАСТ СОТРУДНИКАМ ПОЛИЦИИ ТАБЕЛЬНУЮ МЕБЕЛЬ
00:20
Using dplyr's group_by function with and without summarize (CC233)
25:54
Riffomonas Project
Рет қаралды 4,9 М.
R vs Python: Which should you learn for reproducible data science (CC168)
24:33
TidyTuesday: Deploying Shiny Apps using Docker
15:09
Andrew Couch
Рет қаралды 13 М.
Removing outliers in R with tools from dplyr and ggplot2 (CC232)
21:00
Riffomonas Project
Рет қаралды 6 М.
The only CONDA tutorial you'll need to watch to get started
10:56
Coding Professor
Рет қаралды 50 М.
Anaconda (Conda) for Python - What & Why?
26:10
Academind
Рет қаралды 229 М.
The magrittr and base R pipe: what's the difference? (CC241)
25:47
Riffomonas Project
Рет қаралды 5 М.