Зміст курсу
R Introduction: Part II
R Introduction: Part II
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.
Завдання
Given two vectors: items
and prices
containing the names and prices of goods in an abstract local furniture store. Your tasks are:
- Create a data frame named
store
with two columns,items
andprices
(these are respective variables names). - Output
store
variable value.
Завдання
Given two vectors: items
and prices
containing the names and prices of goods in an abstract local furniture store. Your tasks are:
- Create a data frame named
store
with two columns,items
andprices
(these are respective variables names). - Output
store
variable value.
Все було зрозуміло?
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.
Завдання
Given two vectors: items
and prices
containing the names and prices of goods in an abstract local furniture store. Your tasks are:
- Create a data frame named
store
with two columns,items
andprices
(these are respective variables names). - Output
store
variable value.
Завдання
Given two vectors: items
and prices
containing the names and prices of goods in an abstract local furniture store. Your tasks are:
- Create a data frame named
store
with two columns,items
andprices
(these are respective variables names). - Output
store
variable value.
Все було зрозуміло?
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.
Завдання
Given two vectors: items
and prices
containing the names and prices of goods in an abstract local furniture store. Your tasks are:
- Create a data frame named
store
with two columns,items
andprices
(these are respective variables names). - Output
store
variable value.
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.
Завдання
Given two vectors: items
and prices
containing the names and prices of goods in an abstract local furniture store. Your tasks are:
- Create a data frame named
store
with two columns,items
andprices
(these are respective variables names). - Output
store
variable value.