Class 12

Strings

Materials for class on

2024-10-03

Preparation Materials

Agenda

Today we’ll focus on:

  • continuing experiment analysis
  • strings

Strings

We’ll review examples from the reading and exercises. At this point you should be getting familiar with:

  • escaping characters
  • special characters
  • str_c(), str_glue(), paste, and paste0()
  • separate() and the new variants, especially for separating wider
  • str_length() and str_sub()

Using the experiment analysis project:

  1. Create a new column in one of the dataframes that gives the string length for each sentence.

  2. Create a new column with the first two letters of each sentence.