Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Counting Factor Values | Section
Practice
Projects
Quizzes & Challenges
Quiz
Challenges
/
Essential R Programming for Absolute Beginners - 1768563985826

bookCounting Factor Values

You can count how many times each category appears in a factor using the summary() function.

Example

12345
curr_f <- factor(c('USD', 'EUR', 'AUD', 'NOK', 'CHF', 'EUR', 'AUD', 'EUR')) # Count the occurrences of each level summary(curr_f)
copy

The output lists each level with the number of times it occurs. This makes it easy to see the distribution of categories in your data.

Note
Note

The order in which results appear corresponds to the order of levels in the factor.

Tâche

Swipe to start coding

Compute the frequency of each grade within the grades_f factor.

Solution

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 24
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

close

bookCounting Factor Values

Glissez pour afficher le menu

You can count how many times each category appears in a factor using the summary() function.

Example

12345
curr_f <- factor(c('USD', 'EUR', 'AUD', 'NOK', 'CHF', 'EUR', 'AUD', 'EUR')) # Count the occurrences of each level summary(curr_f)
copy

The output lists each level with the number of times it occurs. This makes it easy to see the distribution of categories in your data.

Note
Note

The order in which results appear corresponds to the order of levels in the factor.

Tâche

Swipe to start coding

Compute the frequency of each grade within the grades_f factor.

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 !

Section 1. Chapitre 24
single

single

some-alt