densityfn function

wrapper to evaluate a density function given by a character string as an argument