Skip to main content

Posts

Showing posts with the label piechart

Univariate graphs (part 2)

Visualizing data prior to any analysis is a basic and important step. Univariate plots are those that take into account one varible, these may include histograms, density plots, boxplots, etc. Here we will cover pie chart and bar chart , which are types of univariate plots. PIE CHART Pie charts are a circular statistical graphic which is divided into slices to repesent a numerical proportion. We have to take into account that using pie charts is difficult to compare different sections of a given pie chart, or to compare data across different pie charts. pie(x, labels = names(x), edges = 200, radius = 0.8, clockwise = FALSE, init.angle = if(clockwise)       90 else 0, density = NULL, angle = 45, col = NULL, border = NULL, lty = NULL, main =             NULL, …) Using the dataset chickwts we can plot which percentatge of chickens have been feed with each feed type. TableFeed <- table(chickwts$feed) TableFeed ## ...