Skip to content

Commit da48291

Browse files
author
Raphael
committed
[skip ci]
1 parent 61411c6 commit da48291

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

cran-comments.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ check_win:
2222
R-hub:
2323
* Fedora Linux, R-devel, clang, gfortran - NOTE (spelling, see below)
2424
* Ubuntu Linux 16.04 LTS, R-release, GCC - 1 NOTE (DOI, see below), 1 WARNING (see below)
25+
* Debian Linux, R-devel, GCC, no long double - NOTE (imports, see below)
2526

2627
## R CMD check results
2728
There were no ERRORs.
2829

2930
There was 1 WARNING:
3031

31-
Conversion of README.md failed:
32+
Conversion of README.md€™ failed:
3233
pandoc: Could not fetch https://codecov.io/gh/alan-turing-institute/distr6/branch/master/graph/badge.svg
3334

3435
* This link works normally for me and in all other builds, I am unsure why there's a problem in the Ubuntu Linux 16.04 LTS R-release.
3536

36-
There were 2 NOTEs:
37+
There were 3 NOTEs:
3738

3839
Found the following (possibly) invalid DOIs:
3940
DOI: 10.2307/2683801
@@ -50,6 +51,11 @@ Found the following (possibly) invalid DOIs:
5051

5152
* These are respectively a name and the phrase 'et al' (not spelling mistakes)
5253

54+
Namespaces in Imports field not imported from:
55+
?pracma? ?R6? ?R62S3?
56+
All declared Imports should be used.
57+
58+
* All imports are used in the package
5359

5460
## Downstream dependencies
5561
There are currently no downstream dependencies for this package.

tests/testthat/test-DistWeightedDiscrete.R

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ test_that("statistics",{
4141
cdf = c(1/5,4/5,1)))$pdf(1:3), c(1/5,3/5,1/5))
4242
expect_equal(WeightedDiscrete$new(data.frame(x = 1:2,
4343
pdf = c(0.5, 0.5)))$cdf(1:2), c(0.5, 1))
44-
set.seed(42)
45-
x = round(runif(1000, 0, 50))
46-
gd = WeightedDiscrete$new(data.frame(x = sort(unique(x)),
47-
pdf = as.numeric(table(x)/length(x))))
48-
expect_equal(round(gd$quantile(gd$cdf(c(2,5,6,4,1,30,20,2,2,2)))),c(2,5,6,4,1,30,20,2,2,2))
44+
45+
gd = WeightedDiscrete$new(data.frame(x = 1:10, pdf = rep(0.1,10)))
46+
expect_equal(round(gd$quantile(gd$cdf(c(2,5,6,4,1,30,20,2,2,2)))),c(2,5,6,4,1,10,10,2,2,2))
4947
expect_equal(length(gd$rand(10)),10)
5048
})

0 commit comments

Comments
 (0)