Perhaps table is what you are after?
dummyData = rep(c(1,2, 2, 2), 25)
table(dummyData)
# dummyData
# 1 2
# 25 75
## or another presentation of the same data
as.data.frame(table(dummyData))
# dummyData Freq
# 1 1 25
# 2 2 75
More Related Contents:
- Add count of unique / distinct values by group to the original data
- Count unique values for every column
- Count number of rows per group and add result to original data frame
- Counting the number of elements with the values of x in a vector
- How can I remove all duplicates so that NONE are left in a data frame?
- Include levels of zero count in result of table()
- Select groups based on number of unique / distinct values
- Add ID column by group [duplicate]
- Create counter within consecutive runs of values
- How to assign a unique ID number to each group of identical values in a column [duplicate]
- Unique rows, considering two columns, in R, without order
- Plot multiple lines (data series) each with unique color in R
- How can I count runs in a sequence?
- Unique on a dataframe with only selected columns
- Count non-NA values by group [duplicate]
- Subset with unique cases, based on multiple columns
- Count number of rows by group using dplyr
- data.table with two string columns of set elements, extract unique rows with each row unsorted
- How to count the frequency of a string for each row in R
- Extend contigency table with proportions (percentages)
- unique() for more than one variable
- Find the n most common values in a vector [duplicate]
- Cumulative count of each value [duplicate]
- Find the most frequent value by row
- Tidyr how to spread into count of occurrence [duplicate]
- Merging rows with the same ID variable [duplicate]
- Count number of columns by a condition (>) for each row
- How can I count the number of NAs per group?
- R force local scope
- ggplot combining two plots from different data.frames