Installing modules for R can be tricky on FreeBSD due to differences between the compiler environment on FreeBSD and Linux. If the R module links against a third-party library, it is likely that the library will not be found without a bit off additional tweaking of the install command. On my FreeBSD 7.1 workstation, I have to use the following commands to install the GSL and Cairo R libraries, both of which link against external libraries. (They are wrappers to these libraries.)
Sys.setenv(MAKE="gmake")
install.packages(c("gsl", "Cairo"), configure.args=c("CPPFLAGS=-I/usr/local/include", "LIBS=-L/usr/local/lib"))
It would be nice if this was supported out of the box in R, but if you know the solution it’s rather trivial to do.

