R/prior_model_pars_CleanString.R

Defines functions prior_model_pars_CleanString

## File Name: prior_model_pars_CleanString.R
## File Version: 0.09


#-- clean string
prior_model_pars_CleanString <- function( ps ){
    ps <- gsub( " ", "", ps )
    ps <- ps[ ps !="" ]
    NP <- length(ps)
    for (pp in 1:NP){
        ps_pp <- ps[pp]
        # locate comment symbol
        h1 <- gregexpr(pattern='#', text=ps_pp)
        if ( h1 > 0){
            ps[pp] <- substring( ps_pp, 1, h1[[1]] -1)
        }
    }
    ps <- ps[ ps !="" ]
    return(ps)
}
alexanderrobitzsch/sirt documentation built on Sept. 8, 2024, 2:45 a.m.