Posts by R on R (for ecology)
Author: R on R (for ecology)
How to reshape your data in R for analysis
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. One of the toughest parts of data analysis is preparing your data to be analyzed. We often have to deal with problems like NAs, typos, and data that are formatted incorrectly. In this blog post, I’m specifically going to help you with that last one — ... Read More
A *simple* introduction to ggplot2 (for plotting your data!)
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. If you’ve ever been totally confused by ggplot2 and what it is or how it works, my intention is that this short tutorial simplifies it down to a conceptual level from which you can build up later. Hope you enjoy! Data visualization is a powerful tool ... Read More
How to make a boxplot in R
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. In this tutorial, I’m going to show you how to plot and customize boxplots (also known as box and whisker plots). Boxplots are a common type of graph that allow you to look at the relationships between a continuous variable and various categorical groups. They are ... Read More
Search through your ecological data with the ‘grep()’ function
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. We often want to search for a certain character pattern in our data. We do this all the time when we press “ctrl + F” (or “cmd + F” for a mac) on a webpage. For example, maybe you have a list of species names and ... Read More
R Data types 101, or What kind of data do I have?
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. Most of us are pretty familiar with data types in our daily lives — we can easily tell that things like 1, 2, 3, and 4 are numbers (in this case, integers). 15.7 is still a number, but has a decimal. We know that every single ... Read More
Complete tutorial on using ‘apply’ functions in R
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. Today I’m going to talk about a useful family of functions that allows you to repetitively perform a specified function (e.g., sum(), mean()) across a vector, list, matrix, or data frame. For those of you familiar with ‘for’ loops, the apply() family often allows you to ... Read More
How to use the group_by function with your ecological data
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. In scientific data and experiments, we often have groups of subjects between which we want to compare an observed response. For example, we might want to compare the growth rates of plants under different light treatments. Or maybe we want to compare CO² emissions of different ... Read More
Making your first plot in R
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. With the new year, I’m hoping more of you take up learning R, so with that I want to share a tutorial from my course on an introduction to data visualization with R to help get you started. If you are completely new to R and ... Read More
How to install (and update!) R and RStudio
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. One of the first steps to learning R is to have it downloaded and installed on your computer. In this post I’ll show you how to do that and how to download and install RStudio—a key tool for using R, and how I do all my ... Read More
Where to ask for help when coding in R
Feed: R-bloggers. Author: R on R (for ecology). [This article was first published on R on R (for ecology), and kindly contributed to R-bloggers]. (You can report issue about the content on this page here) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. When learning R, it can be tough to figure out how to apply what you’ve learned to your own data. We often learn general skills that are helpful for manipulating our data, but things aren’t always so simple when it comes to your own analysis. Sometimes, ... Read More
Recent Comments