If you’re learning R (a programming language that’s used a lot for some bioinformatics and especially data visualization (charts and plots and stuff)) you might come across this thing called the tidyverse. It’s a sort of “alternative” to “base R” which is the “normal” R language, and it lets you use more human-like language (things like “select” and “filter” and “group_by” rather than a bunch of brackets and dollar signs and numbers). 

What tidyverse actually is is a collection of R packages that are all designed to work seamlessly together. And they’re made by the people who make RStudio, which is the user interface you’ll probably use when you’re working with R. I mentioned it the other day in a post about some of the basic programming skills that are good to know (and which I which I knew more of, but am trying!). https://bit.ly/why_program

These tools work nicely with RStudio and RStudio works nicely with “any and all” R, so the 2 together can really help simplify things. But you should also know the basics of “base R” especially since some code you might come across (e.g. on Bioconductor, where they have a ton of programs people have made). Also, you’ll still use some “base R” if you’re using tidyverse. But be careful to know which you’re using when! A lot of times when you Google for help with R (which you will do a lot!) you’ll see instructions for doing something in both ways. Which is how I first came across the tidyverse’s notation. But anyhow…

The tidy verse consists of different packages for different things. A couple of the really useful ones are tidyr and dplyr which allow you to wrangle your data, work with “tibbles” which are basically tables, (but much more fun to say…) etc. And a core one you’ll likely use even if you’re working with base R is ggplot2, which lets you make really wild plots (sometimes more wild than you meant to be…). It’s definitely a learning curve…

Speaking of which. I am NOT an expert in anything computer-related in any way, shape, or form. Thankfully, there are a lot of experts out there who put out a lot of free content to help you learn.

Starting with the people who make the tidyverse (the RStudio folks – thank you by the way!!!). There are some great cheat sheets you can find here: https://www.rstudio.com/resources/cheatsheets/

and even more on Github: https://github.com/rstudio/cheatsheets

And then you can find more about each of the different packages on their websites: https://www.tidyverse.org/packages/ 

they also have links to helpful free resources including a free online book, R for Data Science : https://r4ds.had.co.nz/ 

for ggplot2, there’s a great gallery of examples (with source code): https://r-graph-gallery.com/index.html 

Example code is definitely helpful!!!!

Also helpful are YouTube videos, including this one I stumbled across, Introduction to the {tidyverse}: Essential R Packages by UCSF’s Pat Callahan: https://youtu.be/IEdQWqHdipY 

There’s also a whole YouTube channel run by the RStudio folks: https://www.youtube.com/c/RStudioPBC 

It’s really pretty wild how much free content there is out there!

I’m currently very curious about this reticulate package which lets you run Python in RStudio – let me know if you have experience/thoughts on it https://rstudio.github.io/reticulate/ 

Hope this was helpful to someone – if nothing else just to let you know you’re not alone if you feel like an absolute idiot trying to figure all this out!

more about all sorts of things:  #365DaysOfScience All (with topics listed) 👉 http://bit.ly/2OllAB0 or search blog: https://thebumblingbiochemist.com        

Leave a Reply

Your email address will not be published.