Hands-On Data Science with R
上QQ阅读APP看书,第一时间看更新

Using base R for data manipulation and analysis

Base R provides some extremely helpful functions for day-to-day data analysis. Some such examples have been provided in this section, but are by no means exhaustive. Further details will be available in subsequent chapters, but the corresponding information is intended to provide a general overview of some of base R's capabilities. The structure of a DataFrame can be viewed using the str command.

You can view the structure of data.frame using the str command. This is often the first starting point (after reading a file if applicable) in order to see what your dataset looks like:

# View the structure of the state data.frame 
str(state) 

The output is as follows: