buildServerSPK
Build a Spotfire SPK package file for use on the server.

### Description

Creates a Spotfire SPK package file with Spotfire Enterprise Runtime for R packages suitable for distribution to a Spotfire Server.

### Usage

    buildServerSPK(listFile = "TERRPackagesServer.dcf",
        spkFile = "TERRPackagesServer.spk", repos = "", buildDir = NULL,
        force = FALSE, version = NULL, spkName = NULL)

### Arguments

listFile | a character string specifiying the path to a Debian Control File (.dcf) listing the packages to build in a Packages field.
spkFile | a character string specifying the path the the Spotfire SPK package file to be built. If the file exists, it is overwritten.
repos | a character vector specifying repository URL. See install.packages for limitations on building packages. If it is an empty string, then the packages must have been previously installed. If it is not an empty string, then all packages in the SPK package file are downloaded from the repository.
buildDir | a character vector specifying an existing directory. If it is specified, then the buildDir is used to assemble the packages for the SPK package file. If it is not specified, then a temporary directory is created and subsequently removed.
force | a logical flag. If TRUE, errors about older versions are reduced to warnings. If FALSE (the default), these errors are thrown.
version | a character string or a numeric_version object that specifies the full version of the SPK package file to build. This version number must contain four components (for example, 1.0.0.0). If NULL (the default), the automatic version number increment rules are applied. See Details for more information.
versioned.filename | a logical flag. If TRUE, spkFile is modified to contain the version number of the built package (either before the .spk extension if it is present, or at the end of the filename). If FALSE, spkFile is used verbatim.
spkName | a character string specifying a friendly name for the zip file containing the R packages inside the SPK package. This name is displayed in Deployments and Packages list after you upload your package to Spotfire Server (for example, spkName="Approved Corporate CRAN Packages"). If NULL, then a platform-appropriate default name is used.

### Details

The listFile is used to keep track of changes to the SPK file and should be stored for safe keeping until the SPK file needs to be updated with new packages. Then just edit the list file and run the function again.
Version number incrementing follows these rules (unless it is overriden by the version argument):

- If packages have been added or updated, update the minor version number (for example, 1.2.1.0 to 1.3.0.0).
- If packages have been removed, update the major version number (for example, 1.2.1.0 to 2.0.0.0).
- If packages have been downgraded, update the major version number, but throw an error (which can be reduced to a warning, depending on the value of the force argument).

If the version number of the SPK file is specified using the version argument, and if the version specified is older than the version number incrementing rules would have created, then this function throws an error. This error can be reduced to a warning using the force argument.
Value
returns invisible NULL.
See Also
buildSPK, read.dcf, readLines, install.packages, numeric_version
Examples

    # Install and ensure packages work
    install.packages(c("plyr", "zoo"))
    # Generate a minimal list file
    writeLines("Packages: plyr,zoo", "ServerSPK.dcf")
    # Pass the generated listFile to buildSPK and build the specified package
    library(SpotfireSPK)
    buildServerSPK("ServerSPK.dcf", "ServerSPK.spk")
    # Look at the updated list file
    file.show("ServerSPK.dcf")

Package SpotfireSPK version 6.1.5-18
Package Index