write_PACKAGES: write PACKAGES file

Description Usage Arguments Value Author(s) Examples

Description

When hosting a local mirror of R packages, you need a PACKAGES file which summarises the packages that are being hosted. This writes that PACKAGES file.

Usage

1
2
3
4
  write_PACKAGES(pkgs, outfile = "~/src/contrib/PACKAGES")

  write_PACKAGES_dir(dir,
    outfile = "~/src/contrib/PACKAGES")

Arguments

pkgs

a character vector of package names

outfile

the path to the PACKAGES file. this should be within <mirror>/src/contrib/PACKAGES

dir

the path to a directory containing tar.gz bundles.

Value

nothing. the outfile is written

Author(s)

Mark Cowley, 2013-01-30

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
f <- tempfile()
write_PACKAGES(c("mjcbase", "mjcstats", "mjcgraphics", "excelIO"), f)
readLines(f)

## Not run: 
# all of my packages:
pkgs <- basename(system("find ~/src/R -maxdepth 2 -name DESCRIPTION -exec dirname {} \\;", intern=T))
write_PACKAGES(pkgs)

## End(Not run)

drmjc/updateR documentation built on May 15, 2019, 2:41 p.m.