Learn R Programming

spsurvey (version 3.1)

uniqueID: Create Unique Site ID Values

Description

This function creates unique site IDs by appending a unique number to each occurrence of a site ID. It is intended for survey designs that have repeat visits to sites.

Usage

uniqueID(siteID)

Arguments

siteID
the vector of site IDs.

Value

A vector of unique site ID values.

Examples

Run this code
siteID <- paste("Site", c(1:10, 1, 3, 5), sep="")
uniqueID <- uniqueID(siteID)

Run the code above in your browser using DataLab