Try using logical test and then sum over the values meeting the condition
sum(output$V4 > 2000)
More Related Contents:
- how to apply a function on a data set?
- Understanding exactly when a data.table is a reference to (vs a copy of) another data.table
- Replace values in a dataframe based on lookup table
- Sample random rows in dataframe
- How to change the locale of R?
- Replacing character values with NA in a data frame
- Coerce multiple columns to factors at once
- Delete rows that exist in another data frame? [duplicate]
- Custom legend for multiple layer ggplot
- How do I install a package that has been archived from CRAN?
- R stacked percentage bar plot with percentage of binary factor and labels (with ggplot)
- Subset data to contain only columns whose names match a condition
- Efficiently convert backslash to forward slash in R
- How to add code folding to output chunks in rmarkdown html documents
- Why am I getting “algorithm did not converge” and “fitted prob numerically 0 or 1” warnings with glm?
- Subset and ggplot2
- Extract p-value from aov
- cut function in R- labeling without scientific notations for use in ggplot2
- Why is enquo + !! preferable to substitute + eval
- Print “pretty” tables for h2o models in R
- What are the double colons (::) in R?
- Comparing two vectors in an if statement
- Removing NA observations with dplyr::filter()
- Getting OVER QUERY LIMIT after one request with geocode
- Fixing maps library data for Pacific centred (0°-360° longitude) display
- Get all the rows with rownames starting with ABC111
- Is there a way to paste together the elements of a vector in R without using a loop?
- ddply for sum by group in R
- Difference between `names(df[1])
- Dealing with spaces and “weird” characters in column names with dplyr::rename()