copy.gp: Copy a spectral GP object.

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Creates a new copy of a spectral GP object, with new memory allocated for the object, or copies the elements of one spectral GP object to another one that is already in existence.

Usage

1
2
## S3 method for class 'gp'
copy(object, object2 = NULL,...)

Arguments

object

Spectral GP object to be copied.

object2

Already existing spectral GP object to which the elements of object should be copied. If NULL, the function returns a newly-created copy of object.

...

Other arguments.

Details

This function copies an object of class gp. More details on the spectral representation of GPs can be found in Paciorek (2006).

Value

An object of class gp. If object2 is specified, returns NULL.

Author(s)

Christopher Paciorek paciorek@alumni.cmu.edu

References

Type 'citation("spectralGP")' for references.

See Also

gp, is.gp

Examples

1
2
3
4
5
library(spectralGP)
gp1=gp(128,matern.specdens,c(1,4))
gp2=gp(128,matern.specdens,c(0.5,4))
copy(gp1,gp2)  # gp2 is now a copy of gp1, with first parameter equal to 1
gp3=copy(gp1)

spectralGP documentation built on May 2, 2019, 2:40 a.m.