One of the first steps of data analysis is the descriptive analysis; this helps to understand how the data is distributed and provides important information for further steps. This set of exercises will include functions useful for one variable descriptive analysis, including graphs. Before proceeding, it might be helpful to look over the help pages for the
length, range, median, IQR,
For this set of exercises you will use a dataset called
islands, an R dataset that contains the areas of the world’s major landmasses expressed in squared miles. To load the dataset run the following instruction:
Answers to the exercises are available here.
If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment on that page.
islands dataset and obtain the total number of observations.
Measures of central tendency. Obtain the following statistics of islands
Using the function
range, obtain the following values:
a)Size of the biggest island
b)Size of the smallest island
Measures of dispersion. Find the following values for islands:
b)The range of the islands size using the function
Quantiles. Using the function
quantile obtain a vector including the following quantiles:
a) 0%, 25%, 50%, 75%, 100%
b) .5%, 95%
Interquartile range. Find the interquartile range of islands.
Create an histogram of islands with the following properties.
a) Showing the frequency of each group
b) Showing the proportion of each group
Create box-plots with the following conditions
a) Including outiers
b) Without outliers
Using the function
boxplot find the outliers of islands. Hint: Notice that the
boxplot function does not only creates a plot, but also gives some useful information about the data,
Create a stem and leaf plot of islands
- Become a Top R Programmer Fast with our Individual Coaching Program
- Explore all our (>4000) R exercises
- Find an R course using our R Course Finder directory
- Subscribe to receive weekly updates and bonus sets by email
- Share with your friends and colleagues using the buttons below