[Dplr-commits] r728 - in pkg/dplR: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jan 15 16:15:12 CET 2014
Author: mvkorpel
Date: 2014-01-15 16:15:11 +0100 (Wed, 15 Jan 2014)
New Revision: 728
Modified:
pkg/dplR/ChangeLog
pkg/dplR/R/tbrm.R
Log:
tbrm.R: Check that C has length 1
Modified: pkg/dplR/ChangeLog
===================================================================
--- pkg/dplR/ChangeLog 2014-01-15 11:25:14 UTC (rev 727)
+++ pkg/dplR/ChangeLog 2014-01-15 15:15:11 UTC (rev 728)
@@ -53,8 +53,14 @@
be DFT-even
- Computed more precise values for the 6 dB bandwidths of each window,
also for short windows. Uniform sampling was assumed.
-- Two internal functions moved to top level, previously inside print.redfit()
+- Two internal functions moved to top level, previously inside
+ print.redfit()
+File: tbrm.R
+------------
+
+- Check that C has length 1
+
* CHANGES IN dplR VERSION 1.5.7
File: DESCRIPTION
Modified: pkg/dplR/R/tbrm.R
===================================================================
--- pkg/dplR/R/tbrm.R 2014-01-15 11:25:14 UTC (rev 727)
+++ pkg/dplR/R/tbrm.R 2014-01-15 15:15:11 UTC (rev 728)
@@ -2,7 +2,8 @@
{
y <- as.double(x[!is.na(x)])
n <- as.integer(length(y))
- stopifnot(!is.na(n))
- .C(dplR.tbrm, y, n, as.double(C), result = double(1L), NAOK = TRUE,
+ C2 <- as.double(C)
+ stopifnot(!is.na(n), length(C2) == 1)
+ .C(dplR.tbrm, y, n, C2, result = double(1L), NAOK = TRUE,
DUP = FALSE)$result
}
More information about the Dplr-commits
mailing list