Extract.findFn: Subset a findFn object

Extract.findFnR Documentation

Subset a findFn object

Description

Extract rows from a findFn object

Usage

## S3 method for class 'findFn'
x[i, j,
    drop = 
    if (missing(i)) TRUE else length(cols) == 1]

Arguments

x

An object of class findFn

i

a valid object to select rows of x, e.g., a vector of all positive integers or all negative integers between 1 and nrow(x) or a logical vector of length nrow(x).

j

If not missing, the extraction function returns an object of class data.frame rather than findFn.

drop

logical: if FALSE and j selects only one column, return that column as a vector; else return a data.frame if j is present or a findFn object otherwise.

Details

1. if(missing(j)) extract the subset with the PackageSummary attribute recomputed on the subset.

2. else return(Extract.data.frame(x, i, j, drop))

Value

If j is missing, return an object of class c('findFn', 'data.frame') else return whatever is returned by Extract.data.frame.

Author(s)

Spencer Graves

See Also

findFn, data.frame

Examples

  z <- try(findFn("spline", maxPages = 2))
  
  if(!inherits(z, "try-error")){

  z1 <- z[1,]

  z.2 <- z[, 2]
  }

sos documentation built on May 31, 2023, 7:46 p.m.