From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

fourfoldplot

fourfoldplot

- [Instructor] Lately, I've been doing research on chickens versus fish, and how big and how small are the chickens and how big and how small are the fish? I have a lot of data, and it doesn't make much sense. So let's take a look at something called fourfoldplot that will give me a visual representation of that dataset. First of all, I have three researchers and each of them have provided me with a table of data. Let's take a look at how that all works together. I've put it into something called arrayOfData and in arrayOfData, you'll notice that I had three levels, level one, level two, level three, and at each level, I have a table comparing chickens and fish, big and small. You'll notice that in level one, I have only one big chicken, I have 403 small fish. So, I'd like to get some sort of visual representation of that. Let's use fourfoldplot, and I'll type in four, fold, plot, followed by the name of the array that I'd like to plot, array, of data, and I hit Return, and R produces…

Contents