R/dims_to_vars.R

Defines functions dims_to_vars

Documented in dims_to_vars

dims_to_vars <- function(dl, dimids){
	all.dimids <- get.dimids(dl)  # maybe change to dimids instead of get.dimids??
	if(missing(dimids)) dimids <- all.dimids
	dim.names <- dimnames(dl)[ match(dimids, all.dimids) ]
	
	for(i in seq_along(dimids))
		dl[[ dimids[i] , match.dimids = dimids[i] ]]  <- dim.names[[i]]
	
	return(dl)
}
stevencarlislewalker/multitable documentation built on May 26, 2017, 7:59 p.m.