FillYearlyGapsWithSomeValue: fill missing days with some value

Description Usage Arguments Value Author(s) Examples

View source: R/climtrends.R

Description

FillYearlyGapsWithSomeValue fills (literally) missing years with date+some value.

Usage

1
2
FillYearlyGapsWithSomeValue(dataYearSeries,FromYear=min(dataYearSeries[,1]),
ToYear=max(dataYearSeries[,1]), missingValue=-9999)

Arguments

dataYearSeries

dataframe with climate data

FromYear

starting year

ToYear

ending year

missingValue

value representing missing data

Value

complete time series.

Author(s)

Jose Gama

Examples

1
2
3
4
5
6
7
8
# xgdcnCA008201000.dat is from ECA COLLEGEVILLE temperature
setwd(system.file('extdata/', package='climtrends'))
dailyCollegeville=ReadGHCNymd('xgdcnCA008201000.dat')
yearlyCollegeville=YearFuncFromDay(dailyCollegeville)
colnames(yearlyCollegeville) <- c('year','temperature')
yearlyCollegeville<-ValuesBetween2years(yearlyCollegeville,1918,1993)
yearlyCollegeville<-FillYearlyGapsWithSomeValue(yearlyCollegeville, missingValue=NA)
plot(yearlyCollegeville,type='l')

climtrends documentation built on May 29, 2017, 11:58 p.m.

Search within the climtrends package
Search all R packages, documentation and source code