Description Usage Arguments Details Value Author(s) See Also Examples
Fill up missing hours in the hourly measured datasets
1 2 3 |
input |
a data frame. See Details |
date.time |
a quoted string with the name of a date and time formatted variable |
readings |
number of measures taken a day. Default is 24 (hourly) |
cycle |
a vector with the hours measures are taken. Default is a sequence from 0 to 24/ |
start.date |
initial date for the dummy dataset |
end.date |
final date for the dummy dataset |
date.format |
date format. See |
hour.format |
hour format. See |
offset |
an integer with the number of minutes to shift minutes to |
sep |
character to separate date and time formats. Default is a space character |
This is an environmental-specific function. Suppose, for instance, that during the day, 24 measurements of a pollutant concentration are taken and if it is missing, the monitor keep the entry out of the log. Thus, at the end of the day less than 24 hourly entries are recorded. However, one needs a regular 24-hour vector to carry on with daily statistics computations, i.e., means, quantiles, etc.
This function reads the input dataset from a data frame. A complete dummy dataset with NA
entries is built from the input parameters. Finally, the original dataset and the dummy dataset are merged using the date.time
variables as reference. The resulting filled up dataset may be output to a data frame or directly to a file which format is supported by export_data
.
This function returns a data frame with missing filled up with NA
.
Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br
1 2 3 | ## Not run:
# pm.filled <- fillup_hours(pm_hourly,"Date.Time")
## End (Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.