setGlobalInspectionID: Set Global Inspection ID

View source: R/setGlobalInspectionID.R

setGlobalInspectionIDR Documentation

Set Global Inspection ID

Description

Convert inspections numbers (inspno) 1,2,3,... to globally unique identifiers (inspid), such as "e4b48d86"

Usage

setGlobalInspectionID(
  inspection.data,
  project = NULL,
  default.time = "22:22",
  name.convention = "norm",
  error.file = NULL
)

Arguments

inspection.data

list with elements header.info, inspections, observations

project

name of project to which the data are related, such as: "Lausanne"

default.time

default time string to use if column <inspection-time> is not available. Default: "22:22". A random number will be generated for the seconds, just to increase the chance that setting the time is enough to generate a unique key.

name.convention

one of c("norm", "camel", "snake")

error.file

optional. Path to file to which duplicates are are written (if any). Default: "setGlobalInspectionID_duplicates.txt"

Value

list with the same elements as in inspection.data but with columns inspid being added to the data frames "inspections" and "observations"


KWB-R/kwb.en13508.2 documentation built on April 3, 2024, 9:47 a.m.