fromSERIEStoFILES: fromSERIEStoFILES function

Description Usage Arguments Value Examples

View source: R/fromSERIEStoFILES.R

Description

This function helps to obtain "Files" variable by splitting the issueDates into separate years.

Usage

1
fromSERIEStoFILES(dat = NULL, issueDates = NULL, locale = "English")

Arguments

dat

original dataframe.

issueDates

Variables containing information.

locale

system's locale (English by default).

Value

Returns the dataframe with the dataframe.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
library(HooverArchives)

item_nodes<-list(path="(//c)|(//c01)|(//c02)|(//c03)|(//c04)|(//c05)|(//c06)|(//c07)|(//c08)",
                 nodes=c("primarynode", ".//unittitle", "./did//unitdate", "./did//unitdate",
                         "./did//language", "./did//abstract", ".//container",
                         "./did//container", "./scopecontent[@id]", ".//scopecontent/head",
                         ".//scopecontent/p", "./accessrestrict[@id]",
                         ".//accessrestrict/head", ".//accessrestrict/p", ".//note"),
                 types=c("attrs", "text", "text", "attrs", "attrs", "text", "text", "attrs", "attrs",
                         "text", "text", "attrs", "text", "text", "text"))

collection_nodes<-list(path="archdesc[@level='collection']",
                 nodes=c(".//unittitle", "./did//unitdate", "./did//language", "./did//abstract"),
                 types=c("text", "text", "attrs", "text"))

file_transf<-fromXMLtoCSV(system.file("rusnewspapers.xml", package="HooverArchives"), item_nodes, collection_nodes)

convdata<-fromSERIEStoFILES(file_transf, issueDates="note.text", locale="Russian")

#write.csv(convdata, "convdata_2012C30.csv")

kkalininMI/HooverArchives documentation built on Oct. 28, 2020, 10:16 a.m.