you can create pie charts in Rguroo 4
factors also called categorical
variables using data that is either in
raw form or in the form of a frequency
or relative frequencies for this
tutorial I'm going to be using two data
sets the fishing data set which is from
the EC data repository and the hair eye
color data set from the our data sets
repository if you need assistance
loading any of these data sets please
reference our video uploading a data set
from an Rguroo repository from the
plots toolbar click on the create plot
drop-down then scroll down the pie chart
let's start our first example by loading
the fishing data set within the factor
drop-down we are going to be using the
categorical variable load which
represents the recreational mode of
choice for fishing since we have raw
data we are not going to be using the
frequency drop-down for this data set in
Rguroo the labels of factors are
referred to as the slice labels and the
counts and percentages are called value
labels by default Rguroo places the
percentages of each factor level inside
each pie slice and the slice labels are
displayed horizontally outside the
slices the location of these labels can
be changed using various options in Rguroo
the legend is also defaulted to
display the factor level names only
however I'm going to hit the value radio
button to display the raw counts for
each factor level and finally I'm going
to title this plot mode of fishing when
you are all ready to display your pie
chart hit the preview icon here we can
see the relative proportions of the four
modes of fishing and because we asked
Rguroo to do so we also see their raw
counts in the legend now the hair eye
color data set
in the format of 32 rows created from a
three dimensional array resulting in the
cross tabulation of 592 student
observations those counts are tallied
within the frequency variable for
example there are 32 students who had
black hair brown eyes and were male we
are going to create another pie chart
displaying the proportions of the four
hair colors black brown red and blonde
head over to the plots toolbar again
click on the create plot drop down and
then hit pie chart one more time select
the hair eye color data set and then
choose hair as our factor just like our
last example also click on the value
radio button in the legend section now
due to the structure of this data set
you will need to use the frequency
drop-down to get the correct output if
you preview the results without using
the frequency drop-down you will get a
graph that looks like this here the pie
chart tabulated how many times each hair
color appeared within the hair variable
which now became an even distribution
scroll back over and click the basics
button under the frequency drop down
select the frequency variable let's also
title this plot proportions of hair
color and then let's hit the preview
icon one more time we can now see that a
majority of the students that were
observed had brown hair the finish
things up I'm going to save this pie
chart a student hair color so that I may
reference it later if you would like
further details and examples on how to
create or alter pie charts we encourage
you to reference the chapter creating
pie charts from our user guide book
