edhwpd {sdam} | R Documentation |
Organize EDH dataset province and dates by similarity
Description
Wrapper function to organize EDH
dataset province and dates by simple match similarity.
Usage
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 |
province |
Roman province abbreviation as in |
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.
Note
This function depends on EDH
that is a built-in dataset in the development and legacy version of the package but,
because of its size, for the CRAN distribution it downloads from another repository in References.
Author(s)
Antonio Rivero Ostoic
References
https://edh-www.adw.uni-heidelberg.de/data/api (database retrieved on November 2020)
https://github.com/sdam-au/sdam/tree/master/data
https://github.com/mplex/cedhar/tree/master/pkg/sdam/data
See Also
Examples
## Not run:
# 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"))
## End(Not run)