R/matP.R

Defines functions matP

Documented in matP

#matP.R

# extracts the matrix of probabilities from a carms object simulation 

matP<-function(x) {

	# need to test that x is a carms object among perhaps other validations				
	if(!is(x,"carms")){				
		stop("x  argument is not of class  carms ")			
	}				
	if(is.null(x$simulation)) stop("carms object has no simulation")
	
	P<-x$simulation$P
	P 
}
	

Try the CARMS package in your browser

Any scripts or data that you put into this service are public.

CARMS documentation built on May 29, 2024, 1:26 a.m.