About 162,000 results
Open links in new tab
  1. r - Subset / filter rows in a data frame based on a condition in a ...

    Subset / filter rows in a data frame based on a condition in a column Asked 15 years, 2 months ago Modified 3 years, 1 month ago Viewed 363k times

  2. r - How to combine multiple conditions to subset a data-frame …

    I have a data.frame in R. I want to try two different conditions on two different columns, but I want these conditions to be inclusive. Therefore, I would like to use "OR" to combine the condition...

  3. Subset rows in a data frame based on a vector of values

    If you want to subset rows and keep all columns you have to use the specification object[index_rows, index_columns], while index_cols can be left blank, which will use all …

  4. r - Extracting specific columns from a data frame - Stack Overflow

    You can subset using a vector of column names. I strongly prefer this approach over those that treat column names as if they are object names (e.g. subset()), especially when programming …

  5. r - Subset of rows containing NA (missing) values in a chosen …

    This should create a new data frame (new_data) with only the missing values in it. Works best to keep a track of values that you might later drop because they had some columns with missing …

  6. r - Selecting data frame rows based on partial string match in a …

    I want to select rows from a data frame based on partial match of a string in a column, e.g. column 'x' contains the string "hsa". Using sqldf - if it had a like syntax - I would do somet...

  7. r - Subsetting from a Data Frame - Stack Overflow

    Jun 28, 2016 · On the help page for ?subset, you'll see this under the "Warning" section: "This is a convenience function intended for use interactively. For programming it is better to use the …

  8. r - How do I subset a data frame by multiple different categories ...

    Jun 8, 2022 · I'm trying to subset a data frame by a number of categories. For example - my dataset looks similar to this What I want to do is subset this data frame so I have only the …

  9. r - subsetting in data.table - Stack Overflow

    Mar 30, 2011 · I am trying to subset a data.table ( from the package data.table ) in R (not a data.frame). I have a 4 digit year as a key. I would like to subset by taking a series of years. …

  10. r - Using grep to help subset a data frame - Stack Overflow

    As of R 3.3, there's now also the startsWith function, which you can again use with subset (or with any of the other approaches above). According to the help page for the function, it's …