# The Spotfire Package (SPK)

A Spotfire SPK is usually created and tested by developers to package and deploy third-party extensions to the Spotfire Server, which can then be distributed to the Spotfire Server node for use by another service (and in some cases, distributed to Spotfire clients).

Note: Even though they are both called “packages”, the R package and the Spotfire package (SPK) are different.

- The R package (usually downloaded from a repository, such as CRAN) contains specialized R functions.
- The SPK is a means to deploy extensions to the Spotfire Server, which either distributes its contents to Spotfire Analyst users, or installs for a service, such as the TERR service, to use from the Spotfire Server node.

To make it easy to create SPK files containing TERR functions, use the package SpotfireSPK, which has the following two functions:

- `buildSPK`, which creates an SPK containing packages suitable for distribution to other Spotfire Analyst clients to create analyses using data functions.
  Note: This use case applies only to TERR and not to the TERR service, so it is not covered in the TERR service documentation.
- `buildServerSPK`, which creates an SPK containing packages suitable for distribution to a Spotfire Server for use by the TERR service.

This documentation does not cover Spotfire SPKs in general, only those packages built using the SpotfireSPK package that contain R packages. For more general information about extending Spotfire using the SPK, see the Spotfire Developer documentation available at docs.tibco.com.