Learn R Programming

sos (version 2.0-0)

Extract.findFn: Subset a findFn object

Description

Extract rows from a findFn object

Usage

# S3 method for 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.

Value

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

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))

See Also

findFn, data.frame

Examples

Run this code
# NOT RUN {
  z <- findFn("spline", maxPages = 2)

  z1 <- z[1,]

  z.2 <- z[, 2]
# }

Run the code above in your browser using DataLab