R keep rows with at least one column greater than value

Nitro

Say I have a data frame with a few hundred rows and a few hundred columns. How would I keep rows that have at least one value greater than 10?

Psidom

You can use rowSums to construct the condition in base R:

df[rowSums(df > 10) >= 1, ]

with dplyr (0.7.0), now you can use filter_all like this:

library(dplyr)
filter_all(df, any_vars(. > 10))

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

R keep rows with at least one column greater than value

From Dev

Postgresql: Join another column on the least value greater than left column

From Dev

Check if a pandas Series has at least one item greater than a value

From Dev

How to keep rows where at least one column satisfy a condition in Pandas

From Dev

If value in one column is greater than the value of another then interchange the values in the columns in R

From Dev

If any variable in a row is greater than a value, keep the row in R

From Dev

Loop through rows and keep column values less than random value R

From Dev

Get all rows where a value is in at least one column

From Dev

count the number of values greater than each value in a column of an array in r

From Dev

Find column index where row value is greater than zero in R

From Dev

Merge multiple rows into one with more than one row value in a column

From Dev

Excel, if column is greater than zero and another column contains "Competitor", subtract the value of another column by one

From Dev

get all rows having a column value greater than or equal to particular value

From Dev

UPDATE column if column is greater than a value

From Dev

Mysql remove duplicate rows base on column value but keep the latest one

From Dev

Mysql remove duplicate rows base on column value but keep the latest one

From Dev

regarding keep rows where one column value satisfy certain constraints

From Dev

SUMIF Value is Greater Than Value in Previous Column

From Dev

SQL Server : if one value in a column occurs at least once or another value more than once

From Dev

grep out rows where value is greater than say 50 in certain column

From Dev

MySQL count rows where column value is same and select them where count is greater than 2

From Dev

SQL, only returning rows where at least one more entry with the same value in one column is found

From Dev

SQL, only returning rows where at least one more entry with the same value in one column is found

From Dev

Pandas change column value if greater than len

From Dev

How to check if one value is greater than other

From Dev

checking consecutive rows (greater than or lesser than) of a column

From Dev

Select rows with at least one (any) negative value

From Dev

Select rows with at least one (any) negative value

From Dev

strsplit by spaces greater than one in R

Related Related

  1. 1

    R keep rows with at least one column greater than value

  2. 2

    Postgresql: Join another column on the least value greater than left column

  3. 3

    Check if a pandas Series has at least one item greater than a value

  4. 4

    How to keep rows where at least one column satisfy a condition in Pandas

  5. 5

    If value in one column is greater than the value of another then interchange the values in the columns in R

  6. 6

    If any variable in a row is greater than a value, keep the row in R

  7. 7

    Loop through rows and keep column values less than random value R

  8. 8

    Get all rows where a value is in at least one column

  9. 9

    count the number of values greater than each value in a column of an array in r

  10. 10

    Find column index where row value is greater than zero in R

  11. 11

    Merge multiple rows into one with more than one row value in a column

  12. 12

    Excel, if column is greater than zero and another column contains "Competitor", subtract the value of another column by one

  13. 13

    get all rows having a column value greater than or equal to particular value

  14. 14

    UPDATE column if column is greater than a value

  15. 15

    Mysql remove duplicate rows base on column value but keep the latest one

  16. 16

    Mysql remove duplicate rows base on column value but keep the latest one

  17. 17

    regarding keep rows where one column value satisfy certain constraints

  18. 18

    SUMIF Value is Greater Than Value in Previous Column

  19. 19

    SQL Server : if one value in a column occurs at least once or another value more than once

  20. 20

    grep out rows where value is greater than say 50 in certain column

  21. 21

    MySQL count rows where column value is same and select them where count is greater than 2

  22. 22

    SQL, only returning rows where at least one more entry with the same value in one column is found

  23. 23

    SQL, only returning rows where at least one more entry with the same value in one column is found

  24. 24

    Pandas change column value if greater than len

  25. 25

    How to check if one value is greater than other

  26. 26

    checking consecutive rows (greater than or lesser than) of a column

  27. 27

    Select rows with at least one (any) negative value

  28. 28

    Select rows with at least one (any) negative value

  29. 29

    strsplit by spaces greater than one in R

HotTag

Archive