createInventory {CHCN}R Documentation

Creates an inventory of all stations in the directory

Description

After all the files have been scraped to EnvCanada the next step is to create a master inventory of every station. The cvs files have 7 lines of metadata which is read by this function and formated into a R data structure for saving

Usage

createInventory(directory = "EnvCanada")

Arguments

directory

Defaults to EnvCanada where all scrapes are written to.

Details

As they are scraped the files are given a unique identifier which is contained in the monthly station list. That identifier is a part of the filename is it saved under. The directory is searched for files matching a specific name pattern. Those files are read in and the metadata is collected and formated into a dataframe

Value

the function returns a dataframe conatining all the metadata of the stations in the directory. this should be saved as a file.

Author(s)

Steven Mosher

Examples

## Not run: 

  Inv <- createInvetory()
  write.table(Inv,"masterInventory.inv")


## End(Not run)
 

[Package CHCN version 1.5 Index]