Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre What is a Data Frame? | Data Frames
Introduction à R : Partie I

bookWhat is a Data Frame?

Let's move on to Data Frames. In general, the data frame in R is the same matrix allowing us to store values of different types. This aspect is the crucial difference.

Like in matrices, each element of the data frame has its 'address' among rows and columns. But unlike matrices, data frames must have names on their columns.

R provides us with tens of built-in datasets. Some can be represented as matrices (as they contain only numerical data), and some can be defined as data frames. Explore one of them by yourself!

Tâche

Swipe to start coding

Explore the built-in mtcars dataset.

  1. Using class() function output class of mtcars.
  2. Output mtcars data frame.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 5. Chapitre 1
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Can you show me how to load a built-in dataset as a data frame in R?

Which built-in dataset would you recommend exploring first?

How can I view the structure of a data frame in R?

close

Awesome!

Completion rate improved to 2.27

bookWhat is a Data Frame?

Glissez pour afficher le menu

Let's move on to Data Frames. In general, the data frame in R is the same matrix allowing us to store values of different types. This aspect is the crucial difference.

Like in matrices, each element of the data frame has its 'address' among rows and columns. But unlike matrices, data frames must have names on their columns.

R provides us with tens of built-in datasets. Some can be represented as matrices (as they contain only numerical data), and some can be defined as data frames. Explore one of them by yourself!

Tâche

Swipe to start coding

Explore the built-in mtcars dataset.

  1. Using class() function output class of mtcars.
  2. Output mtcars data frame.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

close

Awesome!

Completion rate improved to 2.27
Section 5. Chapitre 1
single

single

some-alt