subset: Subset an MVST object

Description Usage Arguments Value Examples

Description

This function can be used to subset observations, meshes, and latent fields in the usual manner of subset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
subset(x, ...)

## S4 method for signature 'Basis'
subset(x, ...)

## S4 method for signature 'GMRF_basis'
subset(x, ...)

## S4 method for signature 'GMRF'
subset(x, ...)

## S4 method for signature 'Obs'
subset(x, ...)

## S4 method for signature 'Obs_poly'
subset(x, ...)

Arguments

x

the MVST object

...

relations pertaining to the data frame within the MVST object

Value

object of the same class as x unless x is a mesh, in which case a data frame is returned.

Examples

1
2
3
4
5
6
7
8
9
data(icesat)
icesat_obs <- Obs(df=icesat)
icesat_sub <- subset(icesat_obs,t==3)
print(class(icesat_sub))

data(surf_fe)
Mesh <- initFEbasis(p=surf_fe$p, t = surf_fe$t, M = surf_fe$M, K = surf_fe$K)
Mesh_sub <- subset(Mesh,x < 0)
print(class(Mesh_sub))

shazhe/mvst0 documentation built on May 29, 2019, 9:20 p.m.