Learn R Programming

wsyn (version 1.0.4)

clust_methods: Basic methods for the clust class

Description

Set, get, summary, and print methods for the clust class.

Usage

# S3 method for clust
summary(object, ...)

# S3 method for clust print(x, ...)

# S3 method for clust set_times(obj, newval)

# S3 method for clust set_adj(obj, newval)

# S3 method for clust set_clusters(obj, newval)

# S3 method for clust set_modres(obj, newval)

# S3 method for clust set_mns(obj, newval)

# S3 method for clust set_dat(obj, newval)

# S3 method for clust set_coords(obj, newval)

# S3 method for clust set_methodspecs(obj, newval)

# S3 method for clust set_wmfs(obj, newval)

# S3 method for clust set_wpmfs(obj, newval)

# S3 method for clust get_times(obj)

# S3 method for clust get_adj(obj)

# S3 method for clust get_clusters(obj)

# S3 method for clust get_modres(obj)

# S3 method for clust get_mns(obj)

# S3 method for clust get_dat(obj)

# S3 method for clust get_coords(obj)

# S3 method for clust get_methodspec(obj)

# S3 method for clust get_wmfs(obj)

# S3 method for clust get_wpmfs(obj)

Arguments

object, x, obj

An object of class clust

...

Not currently used. Included for argument consistency with existing generics.

newval

A new value, for the set_* methods

Value

summary.clust produces a summary of a clust object. A print.clust method is also available. For clust objects, set_* and get_* methods are available for all slots (see the documentation for clust for a list). The set_* methods just throw an error, to prevent breaking the consistency between the slots of a clust object.

See Also

clust

Examples

Run this code
# NOT RUN {
sig<-matrix(.8,5,5)
diag(sig)<-1
lents<-50
if (requireNamespace("mvtnorm",quietly=TRUE))
{
  dat1<-t(mvtnorm::rmvnorm(lents,mean=rep(0,5),sigma=sig))
  dat2<-t(mvtnorm::rmvnorm(lents,mean=rep(0,5),sigma=sig))
}else
{
  dat1<-t(matrix(rep(rnorm(lents),times=5),lents,5))
  dat2<-t(matrix(rep(rnorm(lents),times=5),lents,5))
}
dat<-rbind(dat1,dat2)
times<-1:lents
dat<-cleandat(dat,times,clev=1)$cdat
coords<-data.frame(Y=rep(0,10),X=1:10)
method<-"coh.sig.fast"
h<-clust(dat,times,coords,method,nsurrogs = 50)
#nsurrogs should be much higher for a real application
get_times(h)
summary(h)
print(h)

# }

Run the code above in your browser using DataLab