createInventory: Creates an inventory of all stations in the directory

Description Usage Arguments Details Value Author(s) Examples

View source: R/createInventory.R

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

1
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

1
2
3
4
5
6
7
8
## Not run: 

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


## End(Not run)
 

CHCN documentation built on May 2, 2019, 8:53 a.m.