Parse FAERS Quarterly Data
faers_parse(
path,
format = NULL,
year = NULL,
quarter = NULL,
compress_dir = getwd()
)A string specifies the path of FAERS Quarterly Data. You can pass
the FAERS zip file directly, In this way, all files in the zip file will be
extracted in compress_dir. Or, you can also uncompressed youself, and
passed the directory contained the uncompressed files.
File format to used, only "ascii" and "xml" are availabe. Default: "ascii".
Year of the FAERS Quarterly Data. Coerced into integer, if
NULL, this will be extracted from path.
String specifies quarter of the FAERS data, if NULL, this
will be extracted from path.
A string specifies the directory to extract files to. It will be created if necessary.
A FAERSxml or FAERSascii object.
For all fields data:
All names have been converted to lowercase.
Rename "isr" into "primaryid" for periods before 2012q3.
Field specific operations:
demo:
Rename "gndr_cod" into "gender" for periods before 2014q2.
Rename "sex" into "gender" for periods after or equal to 2014q2.
Rename "case" and "i_f_cod" into "caseid" and "i_f_code" for legacy aers, before 2012q3.
"age_in_years" was added, measured in years.
"country_code" was added (encoded according to the iso2c standards), it
will be convenient to translate it into other code with
countrycode().
"sex" was added, which recoded "F" as "Female", "M" as "Male" and other
values as NA.
ther:
Rename "drug_seq" into "dsg_drug_seq" for legacy aers, before 2012q3.
indi:
Rename "drug_seq" into "indi_drug_seq" for legacy aers, before 2012q3.
outc:
Rename "outc_code" into "outc_cod" for 2012q4 data
# the files included in the package are sampled
data <- faers_parse(
system.file("extdata", "aers_ascii_2004q1.zip", package = "faers"),
compress_dir = tempdir()
)