When working with a new dataframe it is important to get an overview of the given data before diving into the project. The following functions can be used for exploring dataframes. find out what they do and how they can be used.

Getting Help with R

R includes extensive facilities for accessing documentation and searching for help. Ofcourse you could also use a general internet search engine.

help() and ?

The help() function and ? help operator in R provide access to the documentation pages for R functions, data sets, and other objects, both for packages in the standard R distribution and for intalled packages. To access documentation for the standard str function, for example, enter the command help(str) or help("str"), or ?str or ?"+" (i.e., the quotes are optional).

Exercise

We have loaded in the dataframe murders for you. Enter the commands at the correct position.

  1. You want to see all column names of the dataframe. Store your result in an object named question1.

  2. You want to see the first 10 rows of the dataframe. Store your result in an object named question2.

  3. You want to see a technical overview of the dataframe object, revealing the internal object structure. Store your result in an object named question3.

  4. You want a columnwise summary of all the data in the dataframe. Store your result in an object named question4.