Source code for fields

The easiest way to view source is to load fields so that comments are keep in the R functions.
library(fields, keep.source=TRUE)
If you would always like to see the source code with comments when you load, see help on options and reset the option for keep.source.pkgs. For example, add to your startup file.
options(keep.source.pkgs=TRUE)
Finally, to extract the entire dierctory of fields source code, grab the package distribution file that ends in ".gz". This is the source code distribution. unzip and untar this file and you will find all source code in the subdirectory R. In UNIX:
gunzip fields_6.0.tar.gz
tar -xvf fields_6.0.tar
# source is in subdirectory fields/R