项目作者: sdam-au

项目描述 :
R package for the Social Dynamics in the Ancient Mediterranean, a Research group based at Aarhus University.
高级语言: R
项目地址: git://github.com/sdam-au/sdam.git
创建时间: 2020-04-27T09:13:24Z
项目社区:https://github.com/sdam-au/sdam

开源协议:Creative Commons Attribution 4.0 International

下载


sdam

Social Dynamics and Complexity in the Ancient Mediterranean

Provides digital tools for performing analyses within Social Dynamics and complexity in the Ancient Mediterranean (SDAM), which is a research group based at the Department of History and Classical Studies at Aarhus University.


Installation

Install sdam package from CRAN or a GitHub repository.

  1. ## from CRAN
  2. install.packages("sdam")
  1. ## development version
  2. devtools::install_github("sdam-au/sdam")

or

  1. ## legacy version R-3.6.x
  2. devtools::install_github("mplex/cedhar", subdir="pkg/sdam")

Usage

  1. ## Load package
  2. library("sdam")
  3. packageVersion("sdam")
  4. #[1] '1.1.1'
  1. ## Load epigraphic data
  2. data("EDH")
  1. # Look at how many inscriptions?
  2. length(EDH)
  3. # [1] 84701
  1. # Also look at the object structure
  2. str(EDH)

Get particular inscriptions

Starting with sdam v0.8.0, it is possible to extract inscriptions from the new API of the EDH database.
For instance, the following commands extract people named in Roman inscriptions in Iudaea and record them with
a list data object in iud.

  1. # obtain epigraphic data from Iudaea
  2. iud <- get.edh(search="inscriptions", province="Iud")
  1. # how many inscriptions in Iudaea?
  2. length(iud)
  3. # [1] 187

Relative dating

In sdam there is the option to extract variables from a EDH dataset fragments with function edhw(),
which allos making transformations as weel. For instance, te ode snippet below is to place Roman inscriptions
in lists from Iudaea into a data frame in object iud_df.

  1. # extract variables of interes from object `iud` and convert it into a data frame
  2. iud_df <- edhw(x=iud, vars=c("not_after", "not_before"), as="df", na.rm=FALSE)
  3. # what object types is?
  4. is(iud_df)
  5. #[1] "data.frame" "list" "oldClass" "vector"

To remove missing data form iud_df, we activate na.rm argument in the function as for iud_df0

  1. # extract variables of interes from object `iud` and convert it into a data frame
  2. iud_df0 <- edhw(x=iud, vars=c("not_after", "not_before"), as="df", na.rm=TRUE)

Now we compare outcomes with these two options.

  1. cbind(head(iud_df,10), head(iud_df0,10))
  2. # id not_before not_after id not_before not_after
  3. #1 HD001461 0071 0130 HD001461 0071 0130
  4. #2 HD001958 0301 0400 HD001958 0301 0400
  5. #3 HD001964 0132 0135 HD001964 0132 0135
  6. #4 HD001973 0071 0130 HD001973 0071 0130
  7. #5 HD001985 0198 0209 HD001985 0198 0209
  8. #6 HD002376 0051 0220 HD002376 0051 0220
  9. #7 HD004074 0026 0036 HD004074 0026 0036
  10. #8 HD004735 0070 0079 HD004735 0070 0079
  11. #9 HD006228 0212 0220 HD006228 0212 0220
  12. #10 HD007068 <NA> <NA> HD011646 0117 0138

Hence, not available data is removed in iud_df0.

People

It is possible to extract the people component from the EDH API dataset, which is an integrated list with their own items.

For instance, the following commands extract people named in Roman inscriptions in Iudaea and Syria into a data frame object
with a long (default) and a data frame with a wide format:

  1. edhw(x=get.edh(search="inscriptions", province="Iud"), vars="people", as="df")
  2. edhw(x=get.edh(search="inscriptions", province="Syr"), vars="people", as="df", wide=TRUE)

The same can apply to the rest of Roman provinces recorded in the EDH dataset.

Specifying output

It is also possible to limit the amount of records to process, and with the following example we can extract the first four
inscriptions by hd_nr id in a data frame with a long format.

  1. edhw(vars="people", as="df", limit=4)
  2. # id age: years cognomen gender name nomen person_id praenomen status tribus
  3. #1 HD000001 <NA> Optata female Noniae P.f. Optatae Nonia 1 <NA> <NA> <NA>
  4. #2 HD000001 <NA> Artemo male C. Iulio Artemoni Iulius 2 C. <NA> <NA>
  5. #3 HD000001 <NA> Optatus male C. Iulius C.f. Optatus Iulius 3 C. <NA> <NA>
  6. #4 HD000002 70 Paris male C. Sextius Paris Sextius 1 C. <NA> <NA>
  7. #5 HD000003 <NA> Sisenna+ Rutilianus+ male [P. M]ummio [P.f. Gal. S]isenna[e Rutiliano] Mummius+ 1 P.+ senatorial order Galeria+
  8. #6 HD000004 <NA> [---] <NA> [---?]AV(?)S(?)[---]L(?)L(?)A M. Porci Nigri ser. <NA> 1 <NA> slaves <NA>
  9. #7 HD000004 <NA> Niger <NA> M. Porci Nigri Porcius 2 M. <NA> <NA>

while a specific record is retrieved by using the id argument as follows:

  1. edhw(vars="people", as="df", id=4444)
  2. # id cognomen gender name nomen person_id praenomen status
  3. #1 HD004444 Gordianus male M. Antoni Gordiani Antonius 1 M. <NA>
  4. #2 HD004444 Tranquillina female Sabiniae Tranquillinae Sabinia 2 <NA> <NA>
  5. #3 HD004444 Mercurialis male Iul. Mercurialis Iulius* 3 <NA> equestrian order

Probability of existence

Since sdam v0.3.0 there is a dedicated function to compute probability of existence of date points or intervals.
We obtain inscriptions from Iudaea in EDH data base, and then compute the aoristic sum with a 5-bin chronological phases.

  1. prex(x=get.edh(search="inscriptions", province="Iud"), vars=c("not_before", "not_after"), cp="bin5")
  2. # Arch Class Hell Rom Byz
  3. # 0.000 0.000 1337.904 13405.017 0.000

Since most of the inscriptions are within the Roman period, we try an eight-bin chronological phases option.

  1. prex(x=get.edh(search="inscriptions", province="Iud"), vars=c("not_before", "not_after"), cp="bin8")
  2. # Arch Class Hell ERom MRom LRom EByz LByz
  3. # 0.0000 0.0000 1337.9040 2396.4529 1200.5623 320.5379 0.0000 0.0000

Vignettes

See also