Manipulating data

Before you can extract information from your data, you need to understand how the data is stored. First, you need to understand data structures in R.

Scalars and vectors are the most basic data structures. In R terminology, you analyze a dataset. A dataset consists of rows with cases or observations, to analyze and columns representing the variables or attributes of the cases. This definition of a dataset looks like a SQL Server table. However, R does not work with tables in the relational sense. For example, in a relational database, the order of rows and columns is not defined. In order to get a value, you need the column name and the key of the row. However, in R, you can use the position of a cell for most data structures. You have already seen this position reference for vectors.

In this section, you will learn about data structures in R and the basic manipulation of datasets, including:

  • Arrays and matrices
  • Factors
  • Data frames
  • Lists
  • Creating new variables
  • Recoding variables
  • Dealing with missing values
  • Type conversions
  • Merging datasets
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.160.43