minor update to function for vignettes. May be deprecated as of R 3.1.0 anyway.