Learn R Programming

metRology (version 0.9-28-1)

Extract.ilab: The 'ilab' class.

Description

Functions for manipulating interlaboratory study objects objects of class ‘ilab’.

Usage

# S3 method for ilab
subset(x, subset, drop=FALSE, …)

# S3 method for ilab [(x, i, j)

Arguments

x

An object of class ‘ilab’

subset

logical expression indicating elements or rows to keep: missing values are taken as false.

drop

passed on to '[' indexing operator.

Parameters passed to other functions

i, j

elements to extract. May be numeric or logical vectors.

Value

An object of class ‘ilab’ with fewer rows and (if j is present) fewer columns.

Warning

Removing the standard columns from ‘ilab’ objects using '[' may have unforeseen consequences for other functions; only the print method is likely to operate successfully.

Details

For the subset method, subset is an expression evaluated in the frame of ilab$data and in the parent environment if objects are not found in ilab$data. Note that since ilab$distrib and ilab$distrib.pars are not in ilab$data, any operation on these must be specified in full.

The indexing method '[' operates on both rows and columns of the object. However, only the $data element can be addressed with the j; the distrib and distrib.pars elements are unaffected by j and will always be included in the returned object.

References

None, yet.

See Also

ilab-class.

Examples

Run this code
# NOT RUN {
data(Pb)
il.pb<-construct.ilab(org=Pb$lab, x=Pb$value, measurand="Pb", item="none", 
                u=Pb$u, k=Pb$k, U=Pb$U, title=c("CCQM K30", "Lead in wine"), method=Pb$method)

subset(il.pb, u < 0.03)

il.pb[1:6,]

# }

Run the code above in your browser using DataLab