1. Learn
  2. /
  3. Courses
  4. /
  5. Helsinki Open Data Science

Connected

Exercise

It's tea time!

The Factominer package contains functions dedicated to multivariate explanatory data analysis. It contains for example methods (Multiple) Correspondence analysis , Multiple Factor analysis as well as PCA.

In the next exercises we are going to use the tea dataset. The dataset contains the answers of a questionnaire on tea consumption.

Let's dwell in teas for a bit!

Instructions

100 XP
  • Create the keep_columns object. Then select() the columns from tea to create a new dataset. Save the new data as tea_time.
  • Look at the summaries and structure of the tea_time data.
  • Visualize the dataset. Define the plot type by adding geom_bar() after initialization of the ggplot. (Ignore the warning.)
  • Adjust the code: the labels of the x-axis are showing poorly. Make the plot more readable by adding theme(axis.text.x = element_text(angle = 45, hjust = 1, size = 8)) after barplot the code.