setFileType: File or Object Name

View source: R/setFileType.R

setFileTypeR Documentation

File or Object Name

Description

Create a new file or object name from an old name with an optional new suffix.

Usage

setFileType(filename, type = "tmp", replace = FALSE)

Arguments

filename

a single character string of the name of the file or object.

type

character string identifying the new suffix.

replace

logical (TRUE or FALSE): replace the current suffix?

Value

A character string like filename but with a new suffix.

Note

This function is designed as a support function for many functions.

Author(s)

Dave Lorenz, original coding by Jim Slack, U.S. Geological Survey retired.

Examples

# Replace the .dat suffix with .txt
setFileType("TestName.dat", "txt", replace=TRUE)

USGS-R/smwrBase documentation built on Oct. 18, 2022, 9:55 a.m.