Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d5e112

Browse files
committed
Changes requested by CRAN
1 parent6d6617c commit0d5e112

File tree

10 files changed

+19
-15
lines changed

10 files changed

+19
-15
lines changed

‎DESCRIPTION‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
Package: xnet
22
Type: Package
33
Title: Two-Step Kernel Ridge Regression for Network Predictions
4-
Version: 0.1.10
4+
Version: 0.1.11
55
Authors@R: c(person("Joris","Meys", email = "Joris.Meys@UGent.be", role
66
= c("cre","aut")), person("Michiel", "Stock", email =
77
"Michiel.Stock@UGent.be", role = "aut"))
88
Description: Fit a two-step kernel ridge regression model for
99
predicting edges in networks, and carry out cross-validation
1010
using shortcuts for swift and accurate performance assessment
1111
(Stock et al, 2018 <doi:10.1093/bib/bby095> ).
12-
Date:2019-12-09
12+
Date:2020-02-03
1313
BugReports: https://github.com/CenterForStatistics-UGent/xnet/issues
1414
URL: https://github.com/CenterForStatistics-UGent/xnet
1515
Depends: R(>= 3.4.0)
1616
Imports: methods, utils, graphics, stats, grDevices
1717
License: GPL-3
1818
Encoding: UTF-8
1919
LazyData: true
20-
RoxygenNote: 7.0.0
20+
RoxygenNote: 7.0.2
2121
Suggests: testthat, knitr, rmarkdown, ChemmineR, covr, fmcsR
2222
VignetteBuilder: knitr
2323
Collate: 'Class_linearFilter.R' 'all_generics.R' 'Class_permtest.R'

‎NEWS.md‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
##xnet 0.1.11
2+
3+
###Bug fixes
4+
5+
* unnecessary mentions of dots argument removed from some help pages.
6+
*`linear_filter()` takes floating point errors into account when checking whether the alpha values sum to 1.
7+
18
##xnet 0.1.10
29

310
###Breaking changes

‎R/getters_tskrrImpute.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#'
77
#' @param x a \code{\link[xnet:tskrrImpute-class]{tskrrImpute}} object or
88
#' an object inheriting from \code{tskrrImpute}.
9-
#' @param ... arguments passed to other methods.
109
#'
1110
#' @return For \code{has_imputed_values}: a logical value indicating whether
1211
#' the model has imputed values. If \code{x} is not some form of a

‎R/getters_tskrrTune.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#'
77
#' @param x a \code{\link[xnet:tskrrTune-class]{tskrrTune}} object or an
88
#' object inheriting from \code{tskrrTune}.
9-
#' @param ... arguments passed to other methods.
109
#'
1110
#' @return For \code{is_tuned}: a logical value indicating whether the
1211
#' model is tuned.

‎R/linear_filter.R‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,12 @@ linear_filter <- function(y, alpha=0.25, na.rm = FALSE){
3535
alpha<- rep(alpha,4)
3636
elseif(length(alpha)!=4)
3737
stop("alpha should be a numeric vector with either 1 or 4 values.")
38-
if(sum(alpha)!=1 )
39-
stop("alpha values should add up to 1.")
38+
39+
# Needed to avoid floating point errors when long double disabled
40+
# Per check by BDR using R configured with --disable-long-double
41+
if(abs(sum(alpha)-1)>.Machine$double.eps^0.5||
42+
any(alpha>1)|| any(alpha<0) )
43+
stop("alpha values should be numbers between 0 and 1 and add up to 1.")
4044

4145
cm<- colMeans(y,na.rm=na.rm)
4246
rm<- rowMeans(y,na.rm=na.rm)

‎R/weights.R‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#' @param object a \code{\link{tskrr}} object for which the weights
1313
#' have to be calculated.
1414
#'
15-
#' @param ... other arguments passed to methods.
1615
#'
1716
#' @return a matrix with the weights for the tskrr model.
1817
#'

‎man/getters-tskrrImpute.Rd‎

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎man/getters-tskrrTune.Rd‎

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎man/weights.Rd‎

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎tests/testthat/test_linearFilter_calculations.R‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,7 @@ test_that("linear_filter returns correct errors",{
6161
expect_error(linear_filter(X,alpha= c(0.5,0.5)),
6262
"alpha should .* either 1 or 4 values")
6363
expect_error(linear_filter(X,alpha= c(0.1,0.1,0.1,0.1)),
64-
"alpha values should add up to 1")
64+
"alpha values should .* add up to 1")
65+
expect_error(linear_filter(X,alpha= c(-0.2,0.2,0.5,0.5)),
66+
"alpha values should be numbers between 0 and 1")
6567
})

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp