SummaryEns: A Self-made function to create a table of descriptive...

Description Usage Arguments

View source: R/SummaryEns.R

Description

Input data from the "ens" database and Taiwan EPA to export to a xlsx file. The function setwd() is recommended to use beforhand to specify the path to the preferred folder.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
SummaryEns(
  variable = c("pm25", "co2", "voc", "temp", "humidity"),
  outputname = "Summary",
  data_path,
  epa_path,
  standard.id = "s26245",
  digits = 4,
  start.time = NULL,
  end.time = NULL
)

Arguments

variable

Variable inputs are the classification of each sheet in the output file. They could be divided into two types. (1) Pollutants-driven: pollutants and factors including "pm25" , "co2" , "voc" , "temp" , and "humidity" could be assigned to the output. The duration wil be fixed following the raw data or the specific date definde by start.time and end.time. (2) Time-driven: Numerous durations are available as needed. The format of variable inputs should be, for example, c("1 days" , "2 days" , "3 days") or c("1 week" , "3 weeks") . Note that when a set of time-driven variables are used, pollutants will be restricted to PM2.5 only.

outputname

The name of output file is required: default is "Summary". Note that the name of the output file should not be repeated otherwise the function will fail.

data_path

The path of the raw "ens" data downloaded.

epa_path

The path of the raw EPA data downloaded.

standard.id

The device ID in the "ens" data that has been adjused. The default is "s26245".

digits

The number of digits after the decimal point. The default is 4.

start.time

It is an option for a preferred starting time. The date format should be "YYYY-mm-dd HH:MM".

end.time

It is an option for a preferred ending time. The date format should be "YYYY-mm-dd HH:MM".


lsyang99/changhua.sensor documentation built on Oct. 8, 2020, 2:45 p.m.