Update the local path in an existing SSN object based on an user defined file.

ssn_update_path(x, path, verbose = FALSE)

Arguments

x

An SSN, ssn_lm or ssn_glm object.

path

Filepath to the .ssn folder associated with the SSN object.

verbose

A logical that indicates if the new path should be printed to the console.

Value

An SSN object with a new path list element.

Details

At times, it may be necessary to move a .ssn directory, which is linked to an SSN object in an R workspace. If the .ssn directory is moved, the path must be updated before using the ssn_glmssn function and other functions that read/write to the .ssn directory. The ssn_update_path is a helper function that serves this purpose.

Examples

## Use mf04p SSN object provided in SSN2
data(mf04p)

## For examples only, make sure mf04p has the correct path
## If you use ssn_import(), the path will be correct
newpath <- paste0(tempdir(), "/MiddleFork04.ssn")
mf04p <- ssn_update_path(mf04p, newpath)