[R-pkg-devel] Fwd: Collaboration Request: h2o R Package Function Cheatsheet

2018-02-03 Thread Juan Telleria Ruiz de Aguirre
Dear R Package Developers,

I have just started doing a cheatsheet for h2o R Package:

https://cran.r-project.org/web/packages/h2o/index.html

So if anyone is interested in contribution, I attach what I have done
till now in Github:

https://github.com/jtelleria/H2O-Cheatsheet

A H2O.ai Statistical Algorithms Cheatsheet already exists, but the new
one will be focused on R h2o package functions:

https://github.com/h2oai/h2o-tutorials/blob/master/training/h2o_algos/h2o_algos_cheat_sheet_04_25_17.pdf

Kind regards,
Juan Telleria

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [Rd] as.list method for by Objects

2018-02-03 Thread Henrik Bengtsson
On Fri, Feb 2, 2018 at 12:07 AM, Martin Maechler
 wrote:
>> Henrik Bengtsson 
>> on Thu, 1 Feb 2018 10:26:23 -0800 writes:
>
> > On Thu, Feb 1, 2018 at 12:14 AM, Martin Maechler
> >  wrote:
> >>> Michael Lawrence 
> >>> on Tue, 30 Jan 2018 15:57:42 -0800 writes:
> >>
> >> > I just meant that the minimal contract for as.list() appears to be 
> that it
> >> > returns a VECSXP. To the user, we might say that is.list() will 
> always
> >> > return TRUE.
> >>
> >> Indeed. I also agree with Herv'e that the user level
> >> documentation should rather mention  is.list(.) |--> TRUE  than
> >> VECSXP, and interestingly for the experts among us,
> >> the  is.list() primitive gives not only TRUE for  VECSXP  but
> >> also of LISTSXP (the good ole' pairlists).
> >>
> >> > I'm not sure we can expect consistency across methods
> >> > beyond that, nor is it feasible at this point to match the
> >> > semantics of the methods package. It deals in "class
> >> > space" while as.list() deals in "typeof() space".
> >>
> >> > Michael
> >>
> >> Yes, and that *is* the extra complexity we have in R (inherited
> >> from S, I'd say)  which ideally wasn't there and of course is
> >> not there in much younger languages/systems such as julia.
> >>
> >> And --- by the way let me preach, for the "class space" ---
> >> do __never__ use
> >>
> >> if(class(obj) == "")
> >>
> >> in your code (I see this so often, shockingly to me ...) but rather use
> >>
> >> if(inherits(obj, ""))
> >>
> >> instead.
>
> > Second this one.  But, soon (*) the former will at least give the
> > correct answer when length(class(obj)) == 1
> > and produce an error
> > otherwise.
>
> Not quite; I think you you did not get the real danger in using
> 'class(.) == *':
> What you say above would only be true if there were only S3 classes!
> Try the following small R snippet
>
> myDate <- setClass("myDate", contains = "Date")
> ## Object of class "myDate"
> ## [1] "2018-02-02"
> (d <- myDate(Sys.Date()))
> class(d) == "Date"  # is FALSE (hence of length 1)
> inherits(d, "Date") # is TRUE
>
> > So, several of these cases will be caught at run-time in a
> > near future.
>
> Maybe.  But all the others are  still wrong, as I show above.

Oh my, thanks for clarifying/emphasizing.  I hope I didn't mislead too
many people.  I've been away from S4 for too long - I like to stay in
the cozy S3 world :)

/Henrik

> Martin
>
> > (*) When _R_CHECK_LENGTH_1_CONDITION_=true becomes the default
> > behavior - hopefully by R 3.5.0.
>
> >>
> >> Martin

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [R-pkg-devel] Help with correcting error in package

2018-02-03 Thread Dev Chakraborty
Thank you; this is most helpful; Dev

On Sat, Feb 3, 2018 at 1:16 PM, Joshua Ulrich 
wrote:

> On Sat, Feb 3, 2018 at 11:44 AM, Dev Chakraborty 
> wrote:
> > Dear All,
> >
> > I tried unsuccessfully to upload a package named RJafroc to CRAN. On my
> OSX
> > machine it passes R CMD Check with no errors, warnings or notes.
> However, I
> > get the following output from CRAN, from which I cannot tell which
> function
> > is causing the error (I am truncating the intermediate lines, which
> appear
> > to be the opening screen upon starting R, with ellipses; the full output
> > produced by the CRAN pre-test is attached):
> >
> Submit your package to http://win-builder.r-project.org.  That will
> provide you access to all the output in the Rcheck.RJafroc directory.
>
> Also note that the "Confirmation" step of the submission process
> suggests, "You could [run R CMD check] using the win-builder service
> at http://win-builder.r-project.org;.  And the CRAN Repository Policy
> says, "It should be normal for those without Windows machines of their
> own to use the winbuilder service to check a package before
> submission."  You could also use https://builder.r-hub.io/.  Both are
> great resources for the community.
>
> >
> >
> > *** running examples for arch 'x64' ... ERROR*
> >
> >
> > *Running examples in 'RJafroc-Ex.R' failed*
> >
> >
> > *The error occurred in:*
> >
> >
> > *R Under development (unstable) (2018-02-01 r74194) -- "Unsuffered
> > Consequences"*
> >
> > *Copyright (C) 2018 The R Foundation for Statistical Computing*
> >
> > *Platform: x86_64-w64-mingw32/x64 (64-bit)*
> >
> >
> > *R is free software and comes with ABSOLUTELY NO WARRANTY.*
> >
> > *You are welcome to redistribute it under certain conditions*
> >
> >
> > *...*
> >
> > *...*
> >
> > *Type 'q()' to quit R.*
> >
> >
> > *> pkgname <- "RJafroc"*
> >
> > *> source(file.path(R.home("share"), "R", "examples-header.R"))*
> >
> >
> > Thanking you in advance for any help rendered,
> >
> > Sincerely,
> >
> > Dev
> >
> > --
> > Dev Chakraborty, PhD
> > Professor of Radiology, retired
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
>
>
> --
> Joshua Ulrich  |  about.me/joshuaulrich
> FOSS Trading  |  www.fosstrading.com
> R/Finance 2018 | www.rinfinance.com
>



-- 
Dev Chakraborty, PhD
Professor of Radiology retired
CEO, ExpertCAD Analytics LLC
412-480-7318 (cell)
‭(412) 427-5085‬ (alt. cell)
412-349-5305 (land line)

*Book website:*
https://www.crcpress.com/9781482214840
*Online supplementary material website:*
https://bitbucket.org/dpc10ster/onlinebookk21778

*CAD Project website:*
www.expertcadanalytics.com
*JAFROC website*
www.devchakraborty.com

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [Rd] CRAN indices out of whack (for at least macOS)

2018-02-03 Thread Winston Chang
Although it may not have been the cause of this particular index
inconsistency, there are other causes of intermittent index
inconsistencies. They could be avoided if there were a different
directory structure on CRAN servers.

One of the causes of inconsistencies is caching. With
cloud.r-project.org (note that this is not cran.r-project.org), the
there is a CDN in front of the server; the CDN has caching endpoints
around the world, and will serve files to the user from the nearest
endpoint.

The cache timeout for each file is 30 minutes. Suppose a user
downloads file X from some endpoint at 1:00. If the endpoint doesn't
already have X in the cache, then it will fetch the file from the
server, and then send it to the user. The endpoint will consider the
cached file valid until 1:30. If another user requests X at 1:20, the
endpoint will serve up the file from its cache without checking with
the server. If someone requests X at 1:40, the endpoint will check
with the server to see if its cached version is still valid (and
download an updated version if necessary), then it wills end the file
to the user.

Because the caching is on a per-file basis, this can lead to a
situation where the PACKAGES file served by an endpoint is out of sync
with the .tgz package files. Imagine this scenario:

1:00 Someone downloads PACKAGES. It is not yet in the endpoint's
cache, so it fetches it from the server. This version of PACKAGES says
that the current version of PkgA is 1.0.
1:10 The server performs an rsync from the central CRAN mirror. It
gets an updated version of PACKAGES, which says that the current
version of PkgA is 2.0. The rsync also removes the PkgA_1.0.tgz file
and adds PkgA_2.0.tgz.
1:20 Someone else wants to install PkgA, so their R session first
downloads PACKAGES, which points to PkgA_1.0.tgz. Then R tries to
download PkgA_1.0.tgz; it is not in the endpoint's cache, so the
endpoint tries to fetch it from the server, but the file is not
present there so it sends a 404 missing message. The endpoint passes
this to the R session, and the package installation fails.

Anyone else who tries to install PkgA (and hits the same CDN endpoint)
will get the same installation failure, until the cache for PACKAGES
expires at 1:30. However, another person who happens to hit another
endpoint may be able to install PkgA, because each endpoint does its
caching independently.

Something similar even without a CDN, because download.packages()
caches the contents of PACKAGES. However, that can be worked around by
telling download.packages() to not use the cache, or by simply
restarting R.

One reason that package installations fail in these cases is that the
current version of a package is in one directory, and the old
(archived) versions of a package are in another directory. If current
and old versions were in the same directory, then package installation
would not fail.


-Winston



On Tue, Jan 30, 2018 at 1:19 PM, Dirk Eddelbuettel  wrote:
>
> I have received three distinct (non-)bug reports where someone claimed a
> recent package of mine was broken ... simply because the macOS binary was not
> there.
>
> Is there something wrong with the cronjob providing the indices? Why is it
> pointing people to binaries that do not exist?
>
> Concretely, file
>
>   https://cloud.r-project.org/bin/macosx/el-capitan/contrib/3.4/PACKAGES
>
> contains
>
>   Package: digest
>   Version: 0.6.15
>   Title: Create Compact Hash Digests of R Objects
>   Depends: R (>= 2.4.1)
>   Suggests: knitr, rmarkdown
>   Built: R 3.4.3; x86_64-apple-darwin15.6.0; 2018-01-29 05:21:06 UTC; unix
>   Archs: digest.so.dSYM
>
> yet the _same directory_ only has:
>
>   digest_0.6.14.tgz 15-Jan-2018 21:36   157K
>
> I presume this is a temporary accident.
>
> We are all spoiled by you all providing such a wonderfully robust and
> well-oiled service---so again big THANKS for that--but today something is out
> of order.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [R-pkg-devel] Help with correcting error in package

2018-02-03 Thread Joshua Ulrich
On Sat, Feb 3, 2018 at 11:44 AM, Dev Chakraborty  wrote:
> Dear All,
>
> I tried unsuccessfully to upload a package named RJafroc to CRAN. On my OSX
> machine it passes R CMD Check with no errors, warnings or notes. However, I
> get the following output from CRAN, from which I cannot tell which function
> is causing the error (I am truncating the intermediate lines, which appear
> to be the opening screen upon starting R, with ellipses; the full output
> produced by the CRAN pre-test is attached):
>
Submit your package to http://win-builder.r-project.org.  That will
provide you access to all the output in the Rcheck.RJafroc directory.

Also note that the "Confirmation" step of the submission process
suggests, "You could [run R CMD check] using the win-builder service
at http://win-builder.r-project.org;.  And the CRAN Repository Policy
says, "It should be normal for those without Windows machines of their
own to use the winbuilder service to check a package before
submission."  You could also use https://builder.r-hub.io/.  Both are
great resources for the community.

>
>
> *** running examples for arch 'x64' ... ERROR*
>
>
> *Running examples in 'RJafroc-Ex.R' failed*
>
>
> *The error occurred in:*
>
>
> *R Under development (unstable) (2018-02-01 r74194) -- "Unsuffered
> Consequences"*
>
> *Copyright (C) 2018 The R Foundation for Statistical Computing*
>
> *Platform: x86_64-w64-mingw32/x64 (64-bit)*
>
>
> *R is free software and comes with ABSOLUTELY NO WARRANTY.*
>
> *You are welcome to redistribute it under certain conditions*
>
>
> *...*
>
> *...*
>
> *Type 'q()' to quit R.*
>
>
> *> pkgname <- "RJafroc"*
>
> *> source(file.path(R.home("share"), "R", "examples-header.R"))*
>
>
> Thanking you in advance for any help rendered,
>
> Sincerely,
>
> Dev
>
> --
> Dev Chakraborty, PhD
> Professor of Radiology, retired
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com
R/Finance 2018 | www.rinfinance.com

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Help with correcting error in package

2018-02-03 Thread Dev Chakraborty
Dear All,

I tried unsuccessfully to upload a package named RJafroc to CRAN. On my OSX
machine it passes R CMD Check with no errors, warnings or notes. However, I
get the following output from CRAN, from which I cannot tell which function
is causing the error (I am truncating the intermediate lines, which appear
to be the opening screen upon starting R, with ellipses; the full output
produced by the CRAN pre-test is attached):



*** running examples for arch 'x64' ... ERROR*


*Running examples in 'RJafroc-Ex.R' failed*


*The error occurred in:*


*R Under development (unstable) (2018-02-01 r74194) -- "Unsuffered
Consequences"*

*Copyright (C) 2018 The R Foundation for Statistical Computing*

*Platform: x86_64-w64-mingw32/x64 (64-bit)*


*R is free software and comes with ABSOLUTELY NO WARRANTY.*

*You are welcome to redistribute it under certain conditions*


*...*

*...*

*Type 'q()' to quit R.*


*> pkgname <- "RJafroc"*

*> source(file.path(R.home("share"), "R", "examples-header.R"))*


Thanking you in advance for any help rendered,

Sincerely,

Dev

--
Dev Chakraborty, PhD
Professor of Radiology, retired
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] nloptr optimization procedure works differently on different platforms

2018-02-03 Thread Metin Bulus
Hi all,

it occured to me, for an optmization procedure, AUGLAG algorithm used in
conjuction with SLSQP algorithm (in nloptr package) can be unstable across
different platforms. Does anyone know what could be possible reason for
this?

Thanks,
Metin

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [Bioc-devel] Trouble syncing repo to bioconductor

2018-02-03 Thread Turaga, Nitesh
You might be using the wrong key.

We have this key on file for you,

ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC+RZ+ONW4XnSYkjIiP0vNWbZ78x2RgpOHsSx9rTLeTvgQ18fXYXVi1Ur8o52k0feTAFW8NHhIUbLIQmTXXqPnMsF3d8E0vcXhYtpahzsTG1QJ+vrq0F9gUbvBskWU8n/zvbqGu6oHLv+hP0s+26ZlHYIk3kB7EZ8Xkz4vn7jNgJzEwGSTvcjbpemlz1zaxuP4zMXDAK0KPUnoX6xeH/X/mDVYPlEdL/KQlbBeQf3HniyDOfTJ8r1UewlX+dq2Szfpz3R0hTaNLFaKTKzK4v5rNrSV0KH3Ao4JAIOyNA+mo9BNpNzbPD7H7XNjcvzxqsHRYPFS5Wu98cayvOLSiwrUj

Make sure you are using the correct private key corresponding with that public 
key.

Take a look at some emails from our archives from users with similar questions, 
https://stat.ethz.ch/pipermail/bioc-devel/2018-January/012712.html

bioconductor.org/developers/how-to/git/faq/ (point #15 might be of help as 
well) 

Best

Nitesh 

> On Feb 3, 2018, at 9:00 AM, bruno contrino via Bioc-devel 
>  wrote:
> 
> Hello, 
> 
> I am having some issues pushing some changes to my package. I am following 
> the steps here:
> 
> https://bioconductor.org/developers/how-to/git/sync-existing-repositories/
> 
> 
> And at step 3 I get the following:
> 
> Permission denied (publickey).
> fatal: Could not read from remote repository.
> 
> I have given my github username to bioconductor via the form found here 
> 
> https://bioconductor.org/developers/how-to/git/new-package-workflow/. 
> 
> I would like to push some changes to the Doscheda package. 
> 
> Thank you for any help.
> 
> Kind Regards,
> 
> Bruno
> 
> ___
> Bioc-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel


[Bioc-devel] Trouble syncing repo to bioconductor

2018-02-03 Thread bruno contrino via Bioc-devel
Hello, 

I am having some issues pushing some changes to my package. I am following the 
steps here:

https://bioconductor.org/developers/how-to/git/sync-existing-repositories/


And at step 3 I get the following:

Permission denied (publickey).
fatal: Could not read from remote repository.

I have given my github username to bioconductor via the form found here 

https://bioconductor.org/developers/how-to/git/new-package-workflow/. 

I would like to push some changes to the Doscheda package. 

Thank you for any help.

Kind Regards,

Bruno

___
Bioc-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/bioc-devel