Archiv der Kategorie: R

Data visualization in R: Boxplot

The box plot is a graphical representation showing the median, quartiles and the smallest and largest values of a data set. It will show a visual shape of the data distribution. The following example shows a simple boxplot of the … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Pie charts

Before we start to look at the features and functions of pie charts let me introduce some thoughts about the benefits and cons of this chart type. You will find a lot of discussions about this topic. Summary of these … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Clustered and stacked bar plot

A bar plot can be used to show data in a cluster or stacked by category. Within this article I want to show you both cases.   Clustered bar plot By default a bar plot is clustered. The following example … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Histogram

A histogram shows vertical bars representing the frequency distribution of a quantitative variable. Histograms are a great way to get to know your data. They allow you to easily see where a large and a little amount of the data … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Add smooth curve and shaded area to a plot

Within this article I want to show you an easy way to add a smooth curve to your plot, create an area around this curve and fill the area with a transparent color. Let’s start with a standard plot. x … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Change the aspect ratio for a plot

To create a meaningful plot or if you want to save your plot as image you may want to define a fix aspect ratio. The plot function itself offers the possibility to define an own aspect ratio by setting the … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen

Data visualization in R: Plotting a function

With the function curve you may plot a function. The following example shows how to use this function.   curve(x^3, from = -10 , to = 10, main = ‚f(x)=x^3‘, lwd = 2) The curve function offers the option add … Weiterlesen

Veröffentlicht unter R | Kommentar hinterlassen