anonymize {Morpho}R Documentation

Replace ID-strings of data and associated files.

Description

Replace ID-strings with for digits - e.g. for blind observer error testing.

Usage

anonymize(
  data,
  remove,
  path = NULL,
  dest.path = NULL,
  ext = ".ply",
  split = "_",
  levels = TRUE,
  prefix = NULL,
  suffix = NULL,
  sample = TRUE
)

Arguments

data

Named array, matrix or vector containing data.

remove

integer: which entry (separated by split) of the name is to be removed

path

Path of associated files to be copied to renamed versions.

dest.path

where to put renamed files.

ext

file extension of files to be renamed.

split

character: by which to split specimen-ID

levels

logical: if a removed entry is to be treated as a factor. E.g. if one specimen has a double entry, the anonymized versions will be named accordingly.

prefix

character: prefix before the alias string.

suffix

character: suffix after the alias ID-string.

sample

logical: whether to randomize alias ID-string.

Value

data

data with names replaced

anonymkey

map of original name and replaced name

Examples


anonymize(iris,remove=1)



[Package Morpho version 2.12 Index]