Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
data.frame() Function | Data Frames
R Introduction: Part II
course content

Contenido del Curso

R Introduction: Part II

R Introduction: Part II

1. Matrices
2. Data Frames
3. Lists

data.frame() Function

Good! Now you can see that data frames can be used to connect different data types. In the previous chapter, you considered one of the build-in datasets. How can we create a data frame with our data?

It can be done by using data.frame() function. This function receives vectors or lists (which we will consider in the next section) as columns. The names for columns are variable's names. For example, let's create a data frame with abstract information on three people.

See, the names for columns come from variables names.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

¿Todo estuvo claro?

Sección 2. Capítulo 2
toggle bottom row

data.frame() Function

Good! Now you can see that data frames can be used to connect different data types. In the previous chapter, you considered one of the build-in datasets. How can we create a data frame with our data?

It can be done by using data.frame() function. This function receives vectors or lists (which we will consider in the next section) as columns. The names for columns are variable's names. For example, let's create a data frame with abstract information on three people.

See, the names for columns come from variables names.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

¿Todo estuvo claro?

Sección 2. Capítulo 2
toggle bottom row

data.frame() Function

Good! Now you can see that data frames can be used to connect different data types. In the previous chapter, you considered one of the build-in datasets. How can we create a data frame with our data?

It can be done by using data.frame() function. This function receives vectors or lists (which we will consider in the next section) as columns. The names for columns are variable's names. For example, let's create a data frame with abstract information on three people.

See, the names for columns come from variables names.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

¿Todo estuvo claro?

Good! Now you can see that data frames can be used to connect different data types. In the previous chapter, you considered one of the build-in datasets. How can we create a data frame with our data?

It can be done by using data.frame() function. This function receives vectors or lists (which we will consider in the next section) as columns. The names for columns are variable's names. For example, let's create a data frame with abstract information on three people.

See, the names for columns come from variables names.

Tarea

Given two vectors: items and prices containing the names and prices of goods in an abstract local furniture store. Your tasks are:

  1. Create a data frame named store with two columns, items and prices (these are respective variables names).
  2. Output store variable value.

Sección 2. Capítulo 2
Cambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
We're sorry to hear that something went wrong. What happened?
some-alt