Skip to content

Commit e8c24e2

Browse files
committed
document arguments, fix typos and bump version
1 parent 9be7b46 commit e8c24e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+182
-176
lines changed

DESCRIPTION

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: REddyProc
22
Type: Package
3-
Version: 1.3.2
3+
Version: 1.3.3
44
Title: Post Processing of (Half-)Hourly Eddy-Covariance Measurements
55
Authors@R: c( person( "Department for Biogeochemical Integration at MPI-BGC, Jena, Germany", role=c("cph"), email="[email protected]" )
66
,person( "Thomas", "Wutzler", role=c("aut","cre"), email="[email protected]" )
@@ -39,9 +39,9 @@ VignetteBuilder: knitr
3939
LinkingTo: Rcpp
4040
Depends: R (>= 3.0.0), methods
4141
Imports: Rcpp, dplyr, purrr, rlang, readr, tibble, magrittr, solartime,
42-
bigleaf (>= 0.7)
42+
bigleaf (>= 0.7), mlegp
4343
Suggests: testthat, minpack.lm, segmented, knitr, rmarkdown, lognorm, ggplot2,
44-
tidyr, markdown, mlegp
44+
tidyr, markdown
4545
Collate:
4646
'CheckVal.R'
4747
'DataFunctions.R'
@@ -67,4 +67,4 @@ Collate:
6767
'logitnorm.R'
6868
'variableNames.R'
6969
'zzzDebugCode.R'
70-
RoxygenNote: 7.2.1
70+
RoxygenNote: 7.3.0

NEWS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# REddyProc 1.3.2_DEV
1+
# REddyProc 1.3.3
22
- Fixed bug in plotting daily sums, where default scale (gC / day) was of by
33
a factor nRecInDays.
44
- Plotting daily sums: Uncertainty computation conservatively assumes fully
55
correlated errors rather than fully independent errors
66
- Provide argument isSplitDatetime to fWriteDataframeToFile to write files
77
consistent with the REddyProc web tool.
8-
- Implement Vekuri23 lookup-table variant of gapfilling
8+
- Implement experimental version of Vekuri23 lookup-table variant of gapfilling
99
- test breakpoint in Barr13 by more powerful pscore.test (Muggeo 2016)
10+
- include mlegp dependency again - its on CRAN again
1011

1112
# REddyProc 1.3.2
1213
- Avoid strong dependency on mlegp (https://github.com/bgctw/REddyProc/issues/58).

R/DataFunctions.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ help_DateTimes <- function(
1515
## \code{\link{fConvertTimeToPosix}}
1616
## \item Convert JulianDate format used in Berkeley release to POSIXct:
1717
## \code{\link{BerkeleyJulianDateToPOSIXct}}
18-
## \item Return the first timestap at (end_of_first_record_in_day) and the
18+
## \item Return the first timestamp at (end_of_first_record_in_day) and the
1919
## last at midnight:
2020
## \code{\link{get_day_boundaries}}
2121
## \item Omit records before the start of the first full day and the end of
@@ -292,8 +292,8 @@ fCheckHHTimeSeries <- function(
292292
## Check half-hourly time series data
293293
Time = Time.V.p ##<< Time vector in POSIX format
294294
, DTS = DTS.n ##<< Number of daily time steps (24 or 48)
295-
, CallFunction = if (!missing(CallFunction.s)) CallFunction.s else '' ##<<
296-
## Name of function called from
295+
, CallFunction = if (!missing(CallFunction.s)) CallFunction.s else '' ##<< Name
296+
## of function called from
297297
, Time.V.p ##<< deprecated
298298
, DTS.n ##<< deprecated
299299
, CallFunction.s ##<< deprecated
@@ -751,7 +751,7 @@ filterLongRuns <- function(
751751

752752
#' @export
753753
get_day_boundaries <- function(
754-
### Return the first timestap at (end_of_first_record_in_day) and the last at midnight
754+
### Return the first timestamp at (end_of_first_record_in_day) and the last at midnight
755755
dt ##<< vector of equidistant POSIXt timestamps with several records a day, usually 48
756756
) {
757757
##seealso<< \code{\link{help_DateTimes}}, \code{\link{filter_entire_days}}
@@ -769,7 +769,7 @@ get_day_boundaries <- function(
769769
#' @export
770770
filter_entire_days <- function(
771771
### Omit records before the start of the first full day and the end of the last full day
772-
df ##<< DataFrame with column col_time of equidistant
772+
df ##<< data.frame with column col_time of equidistant
773773
, col_time = "DateTime" ##<< Name of the column with the equidistant timesteps
774774
) {
775775
##seealso<< \code{\link{help_DateTimes}}, \code{\link{get_day_boundaries}}
@@ -785,7 +785,7 @@ filter_entire_days <- function(
785785
#' @export
786786
filter_years_eop <- function(
787787
### Subset data.frame to given years respecting the end-of-period convention
788-
df ##<< DataFrame with column col_time of equidistant
788+
df ##<< data.frame with column col_time of equidistant
789789
, years ##<< integer vector of years of the form \code{c(1998, 1998)}
790790
, col_time = "DateTime" ##<< Name of the column with the equidistant timesteps
791791
) {

R/EddyGapfilling.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,10 @@ sEddyProc$methods(sFillMDC = sEddyProc_sFillMDC)
443443
sEddyProc_sMDSGapFill <- function(
444444
### MDS gap filling algorithm adapted after the PV-Wave code and paper by Markus Reichstein.
445445
Var = Var.s ##<< Variable to be filled
446-
, QFVar = if (!missing(QFVar.s)) QFVar.s else 'none' ##<<
447-
## Quality flag of variable to be filled
448-
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<<
449-
## Value of quality flag for _good_ (original) data, other data is set to missing
446+
, QFVar = if (!missing(QFVar.s)) QFVar.s else 'none' ##<< Quality flag
447+
## of variable to be filled
448+
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<< Value of
449+
## quality flag for _good_ (original) data, other data is set to missing
450450
, V1 = if (!missing(V1.s)) V1.s else 'Rg' ##<< Condition variable 1
451451
## (default: Global radiation 'Rg' in W m-2)
452452
, T1 = if (!missing(T1.n)) T1.n else 50 ##<< Tolerance interval 1

R/EddyPartitioning.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ sEddyProc$methods(sMRFluxPartition = sEddyProc_sMRFluxPartition)
386386
#' @export
387387
sEddyProc_sCalcPotRadiation <- function(
388388
### compute potential radiation from position and time
389-
useSolartime = TRUE ##<<
390-
## by default corrects hour (given in local winter time)
389+
useSolartime = TRUE ##<< by default
390+
## corrects hour (given in local winter time)
391391
## for latitude to solar time(where noon is exactly at 12:00).
392392
## Set this to FALSE to directly use local winter time
393393
, useSolartime.b ##<< by default corrects hour (given in local winter time)

R/EddyPlotting.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ sEddyProc$methods(.sxClosePlot = .sEddyProc_sxClosePlot)
137137
sEddyProc_sPlotFingerprintY <- function(
138138
### Plot fingerprint for a single year scaled to all data.
139139
Var = Var.s ##<< Variable to plot
140-
, QFVar = 'none' ##<<
141-
## Quality flag of variable to be filled
142-
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<<
143-
## Value of quality flag for data to plot
140+
, QFVar = 'none' ##<< Quality
141+
## flag of variable to be filled
142+
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<< Value
143+
## of quality flag for data to plot
144144
, Year = Year.i ##<< Year to plot
145145
, onlyLegend = if (!missing(Legend.b)) Legend.b else F ##<< Plot
146146
## only legend
@@ -266,8 +266,8 @@ sEddyProc_sPlotFingerprint <- function(
266266
, QFVar = 'none' ##<< Quality flag of variable to be filled
267267
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<< Value of
268268
## quality flag for data to plot
269-
, Format = if (!missing(Format.s)) Format.s else 'pdf' ##<<
270-
## Graphics file format (e.g. 'pdf', 'png')
269+
, Format = if (!missing(Format.s)) Format.s else 'pdf' ##<< Graphics
270+
## file format (e.g. 'pdf', 'png')
271271
, Dir = if (!missing(Dir.s)) Dir.s else 'plots' ##<< Directory
272272
## for plotting
273273
, ... ##<< further arguments to \code{\link{sEddyProc_sPlotFingerprintY}}
@@ -490,10 +490,10 @@ sEddyProc$methods(sPlotDiurnalCycle = sEddyProc_sPlotDiurnalCycle)
490490
sEddyProc_sPlotHHFluxesY <- function(
491491
### Plot half-hourly fluxes for a single year scaled to all data.
492492
Var = Var.s ##<< Variable to plot
493-
, QFVar = if (!missing(QFVar.s)) QFVar.s else 'none' ##<<
494-
## Quality flag of variable to be filled
495-
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<<
496-
## Value of quality flag for data to plot
493+
, QFVar = if (!missing(QFVar.s)) QFVar.s else 'none' ##<< Quality
494+
## flag of variable to be filled
495+
, QFValue = if (!missing(QFValue.n)) QFValue.n else NA_real_ ##<< Value
496+
## of quality flag for data to plot
497497
, Year = Year.i ##<< Year to plot
498498
, data = cbind(sDATA, sTEMP) ##<< data.frame with variables to plot
499499
, dts = sINFO$DTS ##<< numeric integer
@@ -844,7 +844,7 @@ sEddyProc_sPlotNEEVersusUStarForSeason <- function(
844844
, HInchSingle = 6 * 0.394 ##<< height of a subplot in inches, defaults to 6cm
845845
, ... ##<< other arguments to \code{.plotNEEVersusUStarTempClass},
846846
## such as xlab and ylab axis label strings
847-
, data = cbind(sDATA, sTEMP, sUSTAR_DETAILS$bins[,c("uStarBin","tempBin")]) ##<<
847+
, data = cbind(sDATA, sTEMP, sUSTAR_DETAILS$bins[,c("uStarBin","tempBin")]) ##<< a
848848
## data.frame with variables to plot
849849
) {
850850
##author<< TW

R/EddyUStarFilterDP.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ sEddyProc_sEstUstarThold <- function(
2020
## omitting night time data
2121
, ... ##<< further arguments to
2222
## \code{\link{usEstUstarThreshold}}
23-
, seasonFactor = usCreateSeasonFactorMonth(sDATA$sDateTime) ##<<
24-
## factor of seasons to split
23+
, seasonFactor = usCreateSeasonFactorMonth(sDATA$sDateTime) ##<< factor of
24+
## seasons to split
2525
) {
2626
##author<< TW
2727
if (length(seasonFactor) )
@@ -1274,8 +1274,8 @@ sEddyProc_sEstimateUstarScenarios <- function(
12741274
, RgColName = "Rg" ##<< column name for solar radiation for
12751275
## omitting night time data
12761276
, ... ##<< further arguments to \code{\link{sEddyProc_sEstUstarThreshold}}
1277-
, seasonFactor = usCreateSeasonFactorMonth(sDATA$sDateTime) ##<<
1278-
## factor of seasons to split (data is resampled only within the seasons)
1277+
, seasonFactor = usCreateSeasonFactorMonth(sDATA$sDateTime) ##<< factor of
1278+
## seasons to split (data is resampled only within the seasons)
12791279
, nSample = 200L ##<< the number of repetitions in the bootstrap
12801280
, probs = c(0.05, 0.5, 0.95) ##<< the quantiles of the bootstrap sample
12811281
## to return. Default is the 5%, median and 95% of the bootstrap
@@ -1436,7 +1436,8 @@ sEddyProc_sApplyUStarScen <- function(
14361436
## entry in \code{uStarSuffixes}.
14371437
, warnOnOtherErrors = FALSE ##<< Set to only display a warning on errors in
14381438
## uStarScenarios other than uStarScenKeep instead of stopping.
1439-
, uStarSuffixes = .self$sGetUstarSuffixes()
1439+
, uStarSuffixes = .self$sGetUstarSuffixes() ##<< Vector of suffixed
1440+
##<< describing the uStar scenarios
14401441
) {
14411442
##details<<
14421443
## When repeating computations, some of the

R/FileHandling.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ fWriteDataframeToFile <- function(
167167
Data.F ##<< Data frame
168168
, FileName = FileName.s ##<< File base name as a string
169169
, Dir = if (!missing(Dir.s)) Dir.s else '' ##<< Directory as a string
170-
, Digits = if (!missing(Digits.n)) Digits.n else 5 ##<<
171-
## (integer) number of digits, i.e. precision, for numeric values
170+
, Digits = if (!missing(Digits.n)) Digits.n else 5 ##<< (integer) number
171+
## of digits, i.e. precision, for numeric values
172172
, isSplitDatetime = FALSE ##<< set to TRUE to create columns Year, DoY and Hour
173173
, FileName.s ##<< deprecated
174174
, Dir.s ##<< deprecated
@@ -211,8 +211,8 @@ attr(fWriteDataframeToFile, 'ex') <- function() {
211211

212212
#' @export
213213
fSplitDateTime <- function(
214-
### Replace Column DateTime by columns Year, DoY, and Hour in a DataFrame
215-
df ##<< DataFrame with column DateTime
214+
### Replace Column DateTime by columns Year, DoY, and Hour in a data.frame
215+
df ##<< data.frame with column DateTime
216216
) {
217217
##seealso<< \code{\link{fWriteDataframeToFile}}
218218
##details<<

R/FileHandlingFormats.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ fWriteFrench23 <- function(
325325
##author<< TW
326326
##seealso<< \code{\link{fWriteDataframeToFile}}
327327
##details<<
328-
## Writes data.frame as comma-seperated file after two header rows.
328+
## Writes data.frame as comma-separated file after two header rows.
329329
##
330330
## The first header row contains the column names, and the second units.
331331
##

R/GeoFunctions.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ fLloydTaylor <- function(
244244
, E0 = E_0.n ##<< Temperature sensitivity ("activation energy")
245245
## in Kelvin (degK)
246246
, TSoil = Tsoil.n ##<< Soil temperature in Kelvin (degK)
247-
, TRef = if (missing(T_ref.n)) 273.15 + 10 else T_ref.n ##<<
248-
## Reference temperature of 10 degC in Kelvin (degK)
249-
, T0 = if (missing(T_0.n)) 227.13 else T_0.n ##<<
250-
## Regression temperature as fitted by LloydTaylor (1994) in Kelvin (degK)
247+
, TRef = if (missing(T_ref.n)) 273.15 + 10 else T_ref.n ##<< Reference
248+
## temperature of 10 degC in Kelvin (degK)
249+
, T0 = if (missing(T_0.n)) 227.13 else T_0.n ##<< Regression
250+
## temperature as fitted by LloydTaylor (1994) in Kelvin (degK)
251251
, R_ref.n ##<< deprecated way to specify RRef
252252
, E_0.n ##<< deprecated way to specify E0
253253
, Tsoil.n ##<< deprecated way to specify Tsoil
@@ -411,8 +411,8 @@ fCalcExtRadiation <- function(
411411
##description<<
412412
## Calculate the extraterrestrial solar radiation with the
413413
## eccentricity correction
414-
DoY = DoY.V.n
415-
, DoY.V.n ##<< Data vector with day of year (DoY)
414+
DoY = DoY.V.n ##<< Data vector with day of year (DoY)
415+
, DoY.V.n ##<< deprecated, use DoY
416416
##author<<
417417
## AMM
418418
) {
@@ -450,8 +450,8 @@ fCalcPotRadiation <- function(
450450
, LatDeg = Lat_deg.n ##<< Latitude in (decimal) degrees
451451
, LongDeg = Long_deg.n ##<< Longitude in (decimal) degrees
452452
, TimeZone = TimeZone_h.n ##<< Time zone (in hours)
453-
, useSolartime = TRUE ##<<
454-
## by default corrects hour (given in local winter time) for latitude to solar time
453+
, useSolartime = TRUE ##<< by default corrects hour (given in local winter time)
454+
## for latitude to solar time
455455
## (where noon is exactly at 12:00). Set this to FALSE to directly use local winter time
456456
, DoY.V.n ##<< deprecated
457457
, Hour.V.n ##<< deprecated

0 commit comments

Comments
 (0)