Wrapper function to organize EDH dataset province and dates by simple match similarity.

edhwpd(x = "EDH", vars, province, dates, clean, ...)

Arguments

x

EDH dataset, or fragments of, or database via API (optional, list)

vars

vector with variables or attributes chosen from x

province

Roman province abbreviation as in rp

dates

vector with TAQ and TPQ (optional)

clean

whether to remove special characters in text (optional and logical)

...

additional arguments if needed

Details

This wrapper function aims to organize data per Roman province and date by simple match similarities among inscriptions in the EDH dataset. As with function edhw, it is an interface to extract attribute variables in vars from the EDH or similar dataset if x is not specified.

The Roman Empire province is the abbreviation used in the value given by function get.edh and which is in rp dataset.

Argument dates is optional to specify the variables for time intervals (TAQ and TPQ) that in EDH are not_after and not_before, but other datasets may have different names for the endpoints of the timespan. Another dependence with this function is from package "multiplex" to find clusters of items having similar characteristics as co-occurrence relations and for removing isolated items from the system of relations.

Argument clean applies function cln to the province data frame with the chosen variables to remove special characters such as ?*+ and, if needed, re-encode the text.

The output is a list of data frames with similar arguments by descending matches. The records with one or less similarity matches (or having NA attribute values) are placed in the last data frame of the list.

Value

A EDH class object with the province and the number of records with a list of data frames organised by components where the first one has records having most common attribute variables, whereas the last component is a dataframe with records having least common attribute variables.

Author

Antonio Rivero Ostoic

See also

Examples

if (FALSE) {
## load dataset
data(EDH)

## extract province & dates with a single variable attribute from EDH
edhwpd(vars="type_of_inscription", province="Rom", dates=c("not_after", "not_before"))
}