write_PACKAGES(dir = ".", fields = NULL,
type = c("source", "mac.binary", "win.binary"),
verbose = FALSE, unpacked = FALSE, subdirs = FALSE,
latestOnly = TRUE, addFiles = FALSE)NULL (default). The default corresponds to
the fields needed by available.packages:
"Package", "Version", "Priority",
"Depends", "Imports", "LinkingTo",
"Suggests", "Enhances", "OS_type",
"License" and "Archs", and those fields will always
be included, plus
the file name in field "File" if addFile = TRUE
and the path to the subdirectory in field "Path" if subdirectories
are used."win.binary" on Windows and to "source" otherwise.0, no
packages were found and no files were written.write_PACKAGES scans the named directory for R packages,
extracts information from each package's Including non-latest versions of packages is only useful if they have
less constraining version requirements, so for example
latestOnly = FALSE could be used for a source repository when
foo_1.0 depends on R >= 2.15.0 but foo_0.9 is
available which depends on R >= 2.11.0.
Support for repositories with subdirectories and hence for
subdirs != FALSE depends on recording a "Path" field in
the
Support for more general file names (e.g., other types of compression)
via a "File" field in the download.packages. If the file names are not of
the standard form, use addFiles = TRUE.
type = "win.binary" uses unz connections to read
all dir, and builds files
read.dcf and write.dcf for reading
write_PACKAGES("c:/myFolder/myRepository") # on Windows
write_PACKAGES("/pub/RWin/bin/windows/contrib/2.9",
type = "win.binary") # on LinuxRun the code above in your browser using DataLab