sdsdecoding: sdsanalysis decoding functions

Description Usage Arguments

Description

SDS traditionally provides a set of predefined values for each variable. That's not just convenience: It theoretically also allows for a high degree of comparability between different datasets. This predefined values/categories are encoded with a simple and minimalistic alphanumerical scheme. That's a technological rudiment both from the time when the systems that served SDS as an inspiration were created and when most stone tool analysis was made without a computer in reach.

The encoding has the big disadvantage that it's not immediately human readable. If you try to understand a SDS dataset you're forced to constantly look up new variables in the SDS publications. That makes it very difficult to get a fast overview.

sdsanalysis offers functions to quickly decode the cryptic codes in the SDS tables and replace them with human readable descriptions. This is implemented with hash tables to enable high-speed transformation even for datasets with thousands of artefacts. The hash tables are compiled from two reference tables for variables and variable values.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
lookup_everything(sds_df)

lookup_vars(var_ids)

lookup_var_complete_names(var_short_names)

lookup_var_types(var_short_names)

apply_var_types(var_data, var_short_name)

lookup_attrs(var_data, var_short_name)

lookup_attr_types(var_data, var_short_name)

apply_attr_types(var_data, var_short_name)

lookup_IGerM_category(igerm_data, subcategory = FALSE)

Arguments

sds_df

Dataframe. Data.frame in SDS standard format.

var_ids

Character Vector. Variable IDs.

var_short_names

Character Vector. Variable short names.

var_data

Vector. Variable data.

var_short_name

Character. Variable short name.

igerm_data

Character vector. IGerM character codes in data.

subcategory

Boolean. Should the function return IGerM subcategories instead of categories?


Johanna-Mestorf-Academy/sdsanalysis documentation built on May 21, 2019, 4:03 a.m.