Exercise: Creating Your First Data Frame


Let’s create a data frame as shown above using the data.frame() function. The resulting data frame should consist of the three columns weekday, temperature and hot:

  1. The first column named weekday contains the weekday names "Monday", "Tuesday", "Wednesday".
  2. The second column named temperature contains the temperatures (in degrees Celsius) as 28, 31, 25.
  3. The third column named hot contains the logical values FALSE, TRUE, FALSE.

Store the final data frame in the variable temp and print its output to the console:


Submit code to see output here.

Build a data frame from vectors