pass R function to Rcpp by argument

because it is not found otherwise...
update documentation
improve generation and test deletion of temp files