read_nz_ioc: Read-In and Clean the New Zealand Inventory of Chemicals

View source: R/read_nz_ioc.R

read_nz_iocR Documentation

Read-In and Clean the New Zealand Inventory of Chemicals

Description

This function reads-in and automatically cleans the New Zealand Inventory of Chemicals.

Usage

read_nz_ioc(path, clean_non_ascii = FALSE)

Arguments

path

(Character) The path to the XLSX file.

clean_non_ascii

(Logical) Should the non-ASCII characters be reasonably converted? Defaults to FALSE.

Details

This function reads-in and automatically cleans the New Zealand Inventory of Chemicals.

Value

Returns a data frame.

Note

Tested with the December 2021 version.

Author(s)

Raoul Wolf (https://github.com/RaoulWolf/)

Examples

## Not run: 
download.file(
  url = paste(
    "https://www.epa.govt.nz/assets/Uploads/Documents/Hazardous-Substances",
    "Guidance/NZIOC_Full_Spreadsheet_December_2021.xlsx",
    sep = "/"
  ),
  destfile = "NZIOC_Full_Spreadsheet_December_2021.xlsx"
)

path <- "NZIOC_Full_Spreadsheet_December_2021.xlsx"

ioc <- read_ioc(path)

## End(Not run)

RaoulWolf/cleanventory documentation built on Sept. 15, 2022, 4:25 a.m.