finds_l2d {eratosthenes} | R Documentation |
Convert Finds List Object to Data Frame (Context / Find-Type)
Description
Performs the opposite of finds_d2l
. Takes a list
object of finds and their types, used as input in gibbs_ad
, and returns a data.frame
of two columns, containing the context in the first and the find-type in the second, and the id
of the object in the third.
Usage
finds_l2d(input)
## S3 method for class 'list'
finds_l2d(input)
Arguments
input |
A list object of finds (each one a list) of associated contexts and types. |
Value
A three-column data frame of contexts (first column) and find-types attested in that context (second column), along with the id number (third column).
Examples
f1 <- list(id = "find01", assoc = "D", type = c("type1", "form1"))
f2 <- list(id = "find02", assoc = "E", type = c("type1", "form2"))
f3 <- list(id = "find03", assoc = "G", type = c("type1", "form1"))
f4 <- list(id = "find04", assoc = "H", type = c("type2", "form1"))
f5 <- list(id = "find05", assoc = "I", type = "type2")
f6 <- list(id = "find06", assoc = "H", type = NULL)
artifacts <- list(f1, f2, f3, f4, f5, f6)
# convert list to data frame
artifacts_df <- finds_l2d(artifacts)
[Package eratosthenes version 0.0.9 Index]