satscan: Run SaTScan in the OS

View source: R/satscan.R

satscanR Documentation

Run SaTScan in the OS

Description

Calls out into the OS to run SaTScan, with the parameter file specified

Usage

satscan(
  prmlocation,
  prmfilename,
  sslocation = "c:/progra~2/satscan",
  ssbatchfilename = "SaTScanBatch",
  cleanup = TRUE,
  verbose = FALSE
)

Arguments

prmlocation

A string containing the directory location where the paramter file is located.

prmfilename

A string containg the name of the parameter file, without the extension, i.e., no ".prm".

sslocation

A string containing the directory location where satscanbatch.exe (Windows) is located. The default value is a common location in Windows 7.

ssbatchfilename

Name of the file containing the SaTScan executable. This is likely to be either SaTScanBatch or SaTScanBatch64. Omit the file extension.

cleanup

If true, deletes any SaTScan output files from the OS.

verbose

If true, will display the results in the R console as if running SaTScan in batch. This may be especially useful if you expect SaTScan to take a long time to run.

Details

The parameter file may have been made by the ss.options function or not. If not, or if the matchout = FALSE parameter was set in ss.options, then the return object will include the main text output from SaTScan only you manually set the ResultsFile SaTScan parameter to have the same name as the parameter file.

Value

A satscan-class object, which is a list of 8 items, not all of which are always made, depending on SaTScan options and whether the program call was successful or not:

main

A character vector containing the main text output from SaTScan. This is probably identical to the material displayed when verbose=True

col

A data frame with the basic cluster information dataset SaTScan makes.

rr

A data frame with the risk ratio dataset SaTScan makes.

gis

A data frame with the geographic information dataset SaTScan makes.

llr

A data frame with the log likelihood ratios dataset SaTScan makes.

sci

A data frame with the other cluster information dataset SaTScan makes.

shapeclust

A list object, of class sf, defined by the sf package. It contains the ESRI shapefile(s) SaTScan makes. This is made only if the sf package is available.

prm

A character vector containing the contents of the parameter file you told SaTScan to use.

If an item is not made by SaTScan, it will be NA.

See Also

ss.options, write.ss.prm

Examples


## Not run: 
## Please see vignette("rsatscan"); example() code doesn't make sense since
## all examples rely on calls to SaTScan in the OS.

## End(Not run)



rsatscan documentation built on June 26, 2024, 5:08 p.m.