Extract.findFn | R Documentation |
Extract rows from a findFn
object
## S3 method for class 'findFn'
x[i, j,
drop =
if (missing(i)) TRUE else length(j) == 1]
x |
An object of class |
i |
a valid object to select rows of |
j |
If not missing, the extraction function returns
an object of class |
drop |
logical: if |
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))
If j
is missing, return an object of class
c('findFn', 'data.frame')
else return
whatever is returned by Extract.data.frame
.
Spencer Graves
findFn
,
data.frame
z <- try(findFn("spline", maxPages = 2))
if(!inherits(z, "try-error")){
# one row
z1 <- z[1,]
# one column
z.2 <- z[, 2]
#
z.2a <- z[2]
all.equal(z.2, z.2a)
# data.frame with one column
z.2d <- z[, 2, drop=FALSE]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.