- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# How to create a frequency table of a vector that contains repeated values in R?

We can do this by using table function with as.data.frame

## Example

> X <- c(25, 34, 25, 47, 69, 69, 69, 23, 24, 25, 23, 21, 70, 34, 25, 47, 21, 23, 69, 69, 25, 64) > as.data.frame(table(X)) X Freq 1 21 2 2 23 3 3 24 1 4 25 5 5 34 2 6 47 2 7 64 1 8 69 5 9 70 1

- Related Articles
- How to create a vector with repeated values in R?
- How to create frequency table of a string vector in R?
- How to find the frequency of repeated and unique values in a vector in R?
- How to create the plot of a vector that contains missing values by adding the missing values in base R?
- How to find unique permutations if a vector contains repeated elements in R?
- How to find the position of one or more values in a vector into another vector that contains same values in R?
- How to create a frequency table in R that includes zero frequency for value that are not available?
- How to create a vector with zero values in R?
- How to create a table of frequency for range of values in an R data frame column?
- How to create a random vector for a range of values in R?
- How to find the index of the last occurrence of repeated values in a vector in R?
- How to create a matrix using vector of string values in R?
- How to create frequency table of data.table in R?
- How to create a vector with zero values in R Program?
- How to create a data frame with a column having repeated values in R?

Advertisements