Eduardo M. A. M.Mendes <emammendes <at> gmail.com> writes: > R is pretty new to me. I need to write a function that returns three > matrices of different dimensions. In addition, I need to call a function > from a contributed package with the function. I have browsed several > manuals and docs but the examples on them are either very simple or > extremely hard to follow. > > Many thanks > > Ed >
I think you need to try to specify your needs a little bit more carefully. Here is a function that technically meets your needs: library("example_pkg") ## to load the contributed package myfunction <- function() { ## function with no arguments foo() ## assuming the function "foo" is in the package list(matrix(nrow=2,ncol=2),matrix(nrow=3,ncol=3),matrix(nrow=4,ncol=4) } But I suspect that doesn't really do what you need ... Ben Bolker ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.