Learn R Programming

SSN (version 1.1.16)

writeSSN: Write a SpatialStreamNetwork Object

Description

The writeSSN function writes a SpatialStreamnetwork object to a new .ssn directory.

Usage

writeSSN(ssn, filename = "", o.write = FALSE)

Value

writeSSN does not return an object. Instead, it creates a new .ssn directory that contains all of the information in the specified

SpatialStreamNetwork object.

Arguments

ssn

a SpatialStreamNetwork-class object

filename

the file path to the new .ssn folder, in string format. When writing, include the .ssn folder in the path

o.write

If TRUE, overwrite existing ssn. Defaults to FALSE.

Author

Erin E. Peterson support@SpatialStreamNetworks.com

See Also

SpatialStreamNetwork-class

Examples

Run this code

library(SSN)
#for examples, copy MiddleFork04.ssn directory to R's temporary directory
copyLSN2temp()
# NOT RUN
# Create a SpatialStreamNetork object that also contains prediction sites
mf04p <- importSSN(paste0(tempdir(),'/MiddleFork04.ssn'), 
  predpts = "pred1km", o.write = TRUE)

writeSSN(mf04p, filename = paste0(tempdir(),"/tempFile.ssn"))

Run the code above in your browser using DataLab