expand_phenocam: Expand a PhenoCam time series from 3-day to a 1-day time step

Description Usage Arguments Value Examples

View source: R/expand_phenocam.r

Description

Necessary step to guarantee consistent data processing between 1 and 3-day data products. Should rarely be used independent of 'download_phenocam()'.

Usage

1
expand_phenocam(data, truncate = NULL, internal = TRUE, out_dir = tempdir())

Arguments

data

a PhenoCam file

truncate

year (numerical), limit the time series to a particular year (default = NULL)

internal

return a data structure if given a file on disk (TRUE / FALSE = default)

out_dir

output directory where to store data (default = tempdir())

Value

Expanded PhenoCam data structure or file, including 90 day padding if requested.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
# download demo data
download_phenocam(site = "harvard$",
                  veg_type = "DB",
                  roi_id = "1000",
                  frequency = "3")

# Overwrites the original file, increasing
# it's file size.
expand_phenocam(file.path(tempdir(),"harvard_DB_1000_3day.csv"))

# Contracts the file to it's original size, skipping
# two days.
contract_phenocam(file.path(tempdir(),"harvard_DB_1000_3day.csv"))

## End(Not run)

bnasr/phenocamrCS documentation built on June 5, 2020, 3:52 a.m.