setFiles: Set the path and filenames to the standard AHRI datasets....

View source: R/getFiles.R

setFilesR Documentation

Set the path and filenames to the standard AHRI datasets. Required.

Description

Set file paths to the default AHRI datasets, which must be placed into a single folder. The names of the default .dta datasets must be exactly the same as described below. The function also sets the names for the .Rda datasets used in other functions. You should change these names only if you know what you are doing (assume that you don't). The ahri package will never overwrite the default. dta datasets. You must assign the setFiles function to a name called getFiles. See the examples below.

Usage

setFiles(
  folder = "",
  hivfile = "RD05-99 ACDIS HIV All.dta",
  epifile = "SurveillanceEpisodes.dta",
  wghfile = "RD03-99 ACDIS WGH ALL.dta",
  mghfile = "RD04-99 ACDIS MGH ALL.dta",
  bsifile = "RD01-03 ACDIS BoundedStructures.dta",
  hiv_rda = "ACDIS_HIV_All.Rda",
  epi_rda = "SurveillanceEpisodes.Rda",
  wgh_rda = "ACDIS_WGH_ALL.Rda",
  mgh_rda = "ACDIS_MGH_ALL.Rda",
  bsc_rda = "ACDIS_BoundedStructures.Rda"
)

Arguments

folder

The path (as a string) to the folder of default .dta files. If folder="", then the default is to call a dialogue box for you to point and click to the folder path.

hivfile

Reads the file RD05-99 ACDIS HIV All.dta

epifile

Reads the file SurveillanceEpisodesExtended.dta

wghfile

Reads the file RD03-99 ACDIS WGH ALL.dta

mghfile

Reads the file RD04-99 ACDIS MGH ALL.dta

bsifile

Reads the file RD01-03 ACDIS BoundedStructures.dta

hiv_rda

Writes the file ACDIS_HIV_All.Rda

epi_rda

Writes the file SurveillanceEpisodesExtended.Rda

wgh_rda

Writes the file ACDIS_WGH_ALL.Rda

mgh_rda

Writes the file ACDIS_MGH_ALL.Rda

bsc_rda

Writes the file ACDIS_BoundedStructures.Rda

Value

function

Examples


# You must assign the setfiles function to the getFiles name 
getFiles <- setFiles(folder="Path/to/my/datafolder")
# If for some reason your HIV surveillance .dta file is named differently 
getFiles <-setFiles(folder="Path/to/my/datafolder", hivfile="RD09-01 PIP HIV All.dta")
# print out the default file paths and names
setFiles()
# print out your file paths and names
getFiles <-setFiles(folder="Path/to/my/datafolder", hivfile="RD09-01 PIP HIV All.dta")
getFiles()


vando026/ahri documentation built on Aug. 10, 2024, 3:20 p.m.