Giter VIP home page Giter VIP logo

rngtools's People

Contributors

renozao avatar topepo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rngtools's Issues

RNGseq output depends on and may alter RNGkind

I couldn't find this in the documentation, but there are two behaviours I noticed with RNGseq();

  1. the output of RNGseq() depends upon the kind of RNG currently in use (i.e. the value returned by RNGkind()), and;
  2. the first call to RNGseq() will silently set the kind of RNG in use, but seems to not do this in subsequent calls.

So; in a new R session, calling RNGseq() twice with the same data produces different results, and switches the kind of RNG to L'Ecuyer:

RNGkind()
# [1] "Mersenne-Twister" "Inversion"        "Rejection"

rngtools::RNGseq(2, seed=200)
# [[1]]
# [1]       10407  1701029135  -449056764 -1942788299  1218205298  1812398923
# [7]  -535596528
#
# [[2]]
# [1]      10407 1406170078 1440095458 1901155434  897317021 -103132196 1458019338

RNGkind()
# [1] "L'Ecuyer-CMRG" "Inversion"     "Rejection"

rngtools::RNGseq(2, seed=200)
# [[1]]
# [1]       10407  1575099567  -969614556  1117278165  1608171154 -1670773525
# [7] -1475289296
#
# [[2]]
# [1]       10407   307409289   537008121 -2103044188  1354762305  1946813003
# [7] -1982029087

Now if I ask R to switch back to Mersenne (for whatever reason, just to understand behaviour of RNGseq()), two more calls to RNGseq() will now:

  1. return identical results, and;
  2. not alter the kind of RNG in use.
RNGkind("Mersenne")
RNGkind()
# [1] "Mersenne-Twister" "Inversion"        "Rejection"

rngtools::RNGseq(2, seed=200)
# [[1]]
# [1]       10407  1701029135  -449056764 -1942788299  1218205298  1812398923
# [7]  -535596528
#
# [[2]]
# [1]      10407 1406170078 1440095458 1901155434  897317021 -103132196 1458019338

rngtools::RNGseq(2, seed=200)
# [[1]]
# [1]       10407  1701029135  -449056764 -1942788299  1218205298  1812398923
# [7]  -535596528
#
# [[2]]
# [1]      10407 1406170078 1440095458 1901155434  897317021 -103132196 1458019338

RNGkind()
# [1] "Mersenne-Twister" "Inversion"        "Rejection"

Is this intended behaviour, if so, could it be documented?

Here's some the version info for the output above

packageVersion('rngtools')
# [1] ‘1.5’

version
#                _                           
# platform       x86_64-pc-linux-gnu         
# arch           x86_64                      
# os             linux-gnu                   
# system         x86_64, linux-gnu           
# status                                     
# major          3                           
# minor          6.3                         
# year           2020                        
# month          02                          
# day            29                          
# svn rev        77875                       
# language       R                           
# version.string R version 3.6.3 (2020-02-29)
# nickname       Holding the Windsock 

WISH: Add a NEWS file

Hi,

please consider adding a NEWS file to the package to make it easier for end-users/developers to see what has been updated.

R CMD check NOTEs

I'm seeing

checking R code for possible problems ... NOTE
RNGseq : <anonymous>: no visible global function definition for
  ‘nextRNGStream’
RNGseq: no visible global function definition for ‘nextRNGStream’
RNGseq_seed: no visible global function definition for ‘nextRNGStream’
checkRNG: no visible global function definition for ‘checkTrue’

Clarify software license

In your DESCRIPTION file, you list the license as GPL-3, while in the header for file R/RNG.R
the license text states

...
you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

suggesting that the code is covered under GPL-2.

Could you please clarify which license your software is formally covered under? Adding a specific LICENSE file to your repo would also help in this matter.

R version discrepancy

The GH repo has

  • the R version requirement as : R (≥ 3.3.0), methods, pkgmaker (≥ 0.20)

whereas CRAN has it as

  • R (≥ 3.6.0), methods, pkgmaker (≥ 0.20)

Since there are also different versions of the package (1.3.1 on GH and 1.3.1.1 on CRAN), I'm guessing that a CRAN maintainer revised your package and bumped the version. I see no public mention of the reason.

Can you submit a new version that lowers the version requirement? This affects NMF and now that package's dependencies only work for R-devel.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.