R/snap.select.type.2.R

Defines functions snap.select.type.2

Documented in snap.select.type.2

snap.select.type.2 = function(what){
    what=gsub("^\\s+|\\s+$", "", what)
    ndim = 0
    type = FALSE 
    if(what == 'HEAD'){ 
    	ndim = 0
    	type = FALSE 
    }
    if(what == 'POS' || what == 'VEL' || 'BFLD' == what){ 
    	ndim = 3
            type = numeric()
    }
    if(what == 'MASS' || what == 'RHO' || what == 'HSML' || what == 'U'){ 
    	ndim = 1
    	type = numeric()
    }
    if(what == 'ID  '){ 
    	ndim = 1
    	type = integer()
    }
    return(list(ndim=ndim,type=type))
}
asgr/snapshot documentation built on Oct. 8, 2020, 2:52 p.m.