R/cdm_pem_adjust_dimension.R

Defines functions cdm_pem_adjust_dimension

## File Name: cdm_pem_adjust_dimension.R
## File Version: 0.04

cdm_pem_adjust_dimension <- function(x, x_dim )
{
    if ( length(x_dim)==2 ){
        x <- matrix(x, nrow=x_dim[1], ncol=x_dim[2] )
    }
    if ( length(x_dim) >=3){
        x <- array(x, dim=x_dim )
    }
    return(x)
}

Try the CDM package in your browser

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

CDM documentation built on Aug. 25, 2022, 5:08 p.m.