Re: [Rd] force promises inside lapply

2017-07-28 Thread Benjamin Tyner
Thanks Bill. I think my confusion may have been in part due to my 
conflating two distinct meanings of the term "evaluate"; the help for 
force says it "forces the evaluation of a function argument" whereas the 
help for eval says it "evaluates the ... argument ... and returns the 
computed value". I found it helpful to compare:


   > lapply(list(a=1,b=2,c=3), function(x){ force(substitute(x)) })
   $a
   X[[i]]

   $b
   X[[i]]

   $c
   X[[i]]

versus

   > lapply(list(a=1,b=2,c=3), function(x){ eval(substitute(x)) })
   Error in eval(substitute(x)) : object 'X' not found

Now for the context my question arose in: given a function

   loader <- function(package, quietly = TRUE) {

   wrapper <- if (quietly) suppressPackageStartupMessages else `{`

   expr <- substitute(wrapper(library(package = package)))

   eval(expr)
   }

prior to R version 3.2, one could do things like

lapply(c("MASS", "boot"), loader)

but not anymore (which is fine; I agree that one should not depend on 
lapply's implementation details).


Regards,
Ben

On 07/28/2017 06:53 PM, William Dunlap wrote:
1: substitute(), when given an argument to a function (which will be a 
promise) gives you the unevaluated expression given as the argument:


>  L <- list(a=1, b=2, c=3)
> str(lapply(L, function(x) substitute(x)))
List of 3
 $ a: language X[[i]]
 $ b: language X[[i]]
 $ c: language X[[i]]

The 'X' and 'i' are in a frame constructed by lapply and you are not 
really supposed to depend on the precise form of those expressions.


2: An evaluated promise is still a promise: it has the 'evaled' field 
set to TRUE and the 'value' field set to the result of evaluating 
'code' in 'env'.


> f <- function(x, force) {
 if (force) force(x)
 if (pryr::is_promise(x)) promise_info(x)
 else "not a promise"
 }
> str(f(log(-1), force=FALSE))
List of 4
 $ code  : language log(-1)
 $ env   :
 $ evaled: logi FALSE
 $ value : NULL
> str(f(log(-1), force=TRUE))
List of 4
 $ code  : language log(-1)
 $ env   : NULL
 $ evaled: logi TRUE
 $ value : num NaN
Warning message:
In log(-1) : NaNs produced

Can you give a concrete example of what you are try to accomplish?

Bill Dunlap
TIBCO Software
wdunlap tibco.com 

On Fri, Jul 28, 2017 at 3:04 PM, Benjamin Tyner > wrote:


Hi,

I thought I understood the change to lapply semantics resulting
from this,

https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16093


However, would someone care to explain why this does not work?

   > L <- list(a=1, b=2, c=3)
   > str(lapply(L, function(x){ y <- substitute(x); force(x);
eval(y) }))
   Error in eval(y) : object 'X' not found

Basically, my primary goal is to achieve the same result as,

   > str(lapply(L, function(x){ eval.parent(substitute(x)) }))
   List of 3
$ a: num 1
$ b: num 2
$ c: num 3

but without having to resort to eval.parent as that seems to rely
on an implementation detail of lapply.

My secondary goal is to understand why force(x) does not actually
force the promise here,

   > str(lapply(L, function(x){ force(x); pryr::is_promise(x) }))
   List of 3
$ a: logi TRUE
$ b: logi TRUE
$ c: logi TRUE
,
Regards
Ben

__
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


[R-pkg-devel] Problems runing a example (shiny App) within a package

2017-07-28 Thread Kévin A . S . R .
Problems running a example (shiny App) within a package


#main code


runclt = function(){
  shiny::runApp(system.file("shinyCLT", package="CLT"))
}


#example


\examples{
 runclt()
}



#Problem


R CMD check breaks in "checking examples ..." and don't complete the tests.

How to solve it


Link to source code https://1drv.ms/u/s!AqhYme4BRWAog3VVjYb7oJ4jopDN

[https://r1.res.office365.com/owa/prem/images/dc-generic_40.png]
CLT_2.1.1.tar.gz
Compartilhado via OneDrive




thanks in advance,

Kevin Allan S. R.

[[alternative HTML version deleted]]

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


Re: [Rd] force promises inside lapply

2017-07-28 Thread William Dunlap via R-devel
1: substitute(), when given an argument to a function (which will be a
promise) gives you the unevaluated expression given as the argument:

>  L <- list(a=1, b=2, c=3)
> str(lapply(L, function(x) substitute(x)))
List of 3
 $ a: language X[[i]]
 $ b: language X[[i]]
 $ c: language X[[i]]

The 'X' and 'i' are in a frame constructed by lapply and you are not really
supposed to depend on the precise form of those expressions.

2: An evaluated promise is still a promise: it has the 'evaled' field set
to TRUE and the 'value' field set to the result of evaluating 'code' in
'env'.

> f <- function(x, force) {
 if (force) force(x)
 if (pryr::is_promise(x)) promise_info(x)
 else "not a promise"
 }
> str(f(log(-1), force=FALSE))
List of 4
 $ code  : language log(-1)
 $ env   :
 $ evaled: logi FALSE
 $ value : NULL
> str(f(log(-1), force=TRUE))
List of 4
 $ code  : language log(-1)
 $ env   : NULL
 $ evaled: logi TRUE
 $ value : num NaN
Warning message:
In log(-1) : NaNs produced

Can you give a concrete example of what you are try to accomplish?

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Fri, Jul 28, 2017 at 3:04 PM, Benjamin Tyner  wrote:

> Hi,
>
> I thought I understood the change to lapply semantics resulting from this,
>
>https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16093
>
> However, would someone care to explain why this does not work?
>
>> L <- list(a=1, b=2, c=3)
>> str(lapply(L, function(x){ y <- substitute(x); force(x); eval(y) }))
>Error in eval(y) : object 'X' not found
>
> Basically, my primary goal is to achieve the same result as,
>
>> str(lapply(L, function(x){ eval.parent(substitute(x)) }))
>List of 3
> $ a: num 1
> $ b: num 2
> $ c: num 3
>
> but without having to resort to eval.parent as that seems to rely on an
> implementation detail of lapply.
>
> My secondary goal is to understand why force(x) does not actually force
> the promise here,
>
>> str(lapply(L, function(x){ force(x); pryr::is_promise(x) }))
>List of 3
> $ a: logi TRUE
> $ b: logi TRUE
> $ c: logi TRUE
> ,
> Regards
> Ben
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

[[alternative HTML version deleted]]

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


[Rd] force promises inside lapply

2017-07-28 Thread Benjamin Tyner

Hi,

I thought I understood the change to lapply semantics resulting from this,

   https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16093

However, would someone care to explain why this does not work?

   > L <- list(a=1, b=2, c=3)
   > str(lapply(L, function(x){ y <- substitute(x); force(x); eval(y) }))
   Error in eval(y) : object 'X' not found

Basically, my primary goal is to achieve the same result as,

   > str(lapply(L, function(x){ eval.parent(substitute(x)) }))
   List of 3
$ a: num 1
$ b: num 2
$ c: num 3

but without having to resort to eval.parent as that seems to rely on an 
implementation detail of lapply.


My secondary goal is to understand why force(x) does not actually force 
the promise here,


   > str(lapply(L, function(x){ force(x); pryr::is_promise(x) }))
   List of 3
$ a: logi TRUE
$ b: logi TRUE
$ c: logi TRUE
,
Regards
Ben

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


[Rd] I have corrected a dead link in the treering documentation

2017-07-28 Thread Thomas Levine
The attached patch corrects a dead link in the treering documentation.

The URL in the manual [1] refers to a personal home page belonging to
Christine Hallman (user "hallman") on the website of the University of
Arizona Laboratory of Tree-Ring Research (LTRR). It seems that the LTRR
personal homepages have been moved to a new root directory [2] and that
Hallman's webpage is no longer there.

I have contacted Dr. Hallman. She confirmed that the LTRR hosting has
changed and that she has not set up her website on a new host. Also,
I have not managed to find any other photographs of the Methuselah Walk.
So the page on the Wayback Machine [3] is the best option I see for now.

Dr. Hallman also told me that she has more photographs of the tree, and
she has offered to publish them in order that we may reference more
photographs eventually.

I have used approximately the following procedure to build and confirm
that the result is formatted properly. (I'm think all of these lines are
necessary, but I am not sure that this is the right order.)

  ./configure --without-recommended-packages
  cd src/library
  make all docs Rdfiles
  cd -
  make
  bin/R -e 'help(treering)'

I found other dead links in the base documentation, but I thought most
should be kept for reference, as they were usually links to a
publisher's webpage for a particular journal article or book. The link
of present interest just provides context about the tree whose rings
were measured, so I think it is okay to change the link.

[1] http://www.ltrr.arizona.edu/~hallman/sitephotos/meth.html
[2] http://www.ltrr.arizona.edu/webhome/
[3] 
https://web.archive.org/web/20110523225828/http://www.ltrr.arizona.edu/~hallman/sitephotos/meth.html
Index: src/library/datasets/man/treering.Rd
===
--- src/library/datasets/man/treering.Rd(revision 72947)
+++ src/library/datasets/man/treering.Rd(working copy)
@@ -32,6 +32,6 @@
 }
 \references{
   For some photos of Methuselah Walk see
-  \url{http://www.ltrr.arizona.edu/~hallman/sitephotos/meth.html}
+  
\url{https://web.archive.org/web/20110523225828/http://www.ltrr.arizona.edu/~hallman/sitephotos/meth.html}
 }
 \keyword{datasets}
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Problems with S4 methods dispatching on `...` (aka dotsMethods)

2017-07-28 Thread Michael Lawrence
I pushed the patch to the 3.4 branch. Feel free to test.

Michael

On Wed, Jul 26, 2017 at 4:02 AM, Andrzej Oleś  wrote:
> Hi Michael,
>
> it seems that your patch to S4 generics dispatching on `...` is still
> available only in R-devel, and was not included in the minor R-3.4.1
> release. I was wondering what is the policy of incorporating bug fixes from
> the devel branch into release, and whether there is any chance that the
> broken `...` dispatch is fixed before R-3.5.0?
>
> Cheers,
> Andrzej
>
>
> On Tue, Apr 25, 2017 at 4:15 PM, Andrzej Oleś 
> wrote:
>>
>> You're right, I must have mixed up my R versions when running the example,
>> as the problem seems to be resolved in R-devel.
>>
>> Sorry for the noise and thanks again for fixing this.
>>
>> Andrzej
>>
>> On Tue, Apr 25, 2017 at 3:55 PM, Michael Lawrence
>>  wrote:
>>>
>>> I attempted to fix it, and that example seems to work for me. It's
>>> also a (passing) regression test in R. Are you sure you're using a new
>>> enough R-devel?
>>>
>>>
>>> On Tue, Apr 25, 2017 at 2:34 AM, Andrzej Oleś 
>>> wrote:
>>> > Hi Michael,
>>> >
>>> > thanks again for your patch! I've tested it and I'm happy to confirm
>>> > that
>>> > `callNextMethod()` works with methods dispatching on `...`.
>>> >
>>> > However, the second issue I reported still seems to be unresolved.
>>> > Consider
>>> > the following toy example, where the `f()` calls differ in result
>>> > depending
>>> > on whether the dispatch happens on a formal argument or the `...`
>>> > argument.
>>> >
>>> >
>>> > f = function(x, ..., a = b) {
>>> >   b = "missing 'a'"
>>> >   print(a)
>>> > }
>>> >
>>> > f()
>>> > ## [1] missing 'a'
>>> >
>>> > f(a = 1)
>>> > ## [1] 1
>>> >
>>> > setGeneric("f", signature = "x")
>>> >
>>> > # works as the non-generic version
>>> > f()
>>> > ## [1] missing 'a'
>>> >
>>> > setGeneric("f", signature = "...")
>>> >
>>> > # unexpectedly fails to find 'b'
>>> > f()
>>> > ## Error in print(a) : object 'b' not found
>>> >
>>> >
>>> > Any chances of fixing this?
>>> >
>>> > Cheers,
>>> > Andrzej
>>> >
>>> >
>>> >
>>> > On Fri, Apr 21, 2017 at 11:40 AM, Andrzej Oleś 
>>> > wrote:
>>> >>
>>> >> Great, thanks Michael for you quick response!
>>> >>
>>> >> I started off with a question on SO because I was not sure whether
>>> >> this
>>> >> was an actual bug or I was just missing something obvious. I'm looking
>>> >> forward to the patch.
>>> >>
>>> >> Cheers,
>>> >> Andrzej
>>> >>
>>> >>
>>> >> On Thu, Apr 20, 2017 at 10:28 PM, Michael Lawrence
>>> >>  wrote:
>>> >>>
>>> >>> Thanks for pointing out these issues. I have a fix that I will commit
>>> >>> soon.
>>> >>>
>>> >>> Btw, I would never have seen the post on Stack Overflow. It's best to
>>> >>> report bugs on the bugzilla.
>>> >>>
>>> >>> Michael
>>> >>>
>>> >>> On Thu, Apr 20, 2017 at 8:30 AM, Andrzej Oleś
>>> >>> 
>>> >>> wrote:
>>> >>> > Hi all,
>>> >>> >
>>> >>> > I recently encountered some unexpected behavior with S4 generics
>>> >>> > dispatching on `...`, which I described in
>>> >>> >
>>> >>> >
>>> >>> > http://stackoverflow.com/questions/43499203/use-callnextmethod-with-dotsmethods
>>> >>> >
>>> >>> > TL;DR: `callNextMethod()` doesn't work in methods dispatching on
>>> >>> > `...`,
>>> >>> > and
>>> >>> > arguments of such methods are resolved differently than the
>>> >>> > arguments
>>> >>> > of
>>> >>> > methods dispatching on formal arguments.
>>> >>> >
>>> >>> > Could this indicate a potential problem with the implementation of
>>> >>> > the
>>> >>> > `...` dispatch?
>>> >>> >
>>> >>> > Cheers,
>>> >>> > Andrzej
>>> >>> >
>>> >>> > [[alternative HTML version deleted]]
>>> >>> >
>>> >>> > __
>>> >>> > 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: [Bioc-devel] git transition for projects with prior git history

2017-07-28 Thread McDavid, Andrew
Hi Nitesh,

Schematically, my git repo started with commit D, while bioconductor's started 
with A.  It's possible this was because I did something wrong managing the 
bioconductor repo, but since I can't rewrite history, there's not anything I 
can do about that now.  Their "founding" commits are distinct.


 BioconductorA---B---C
   / /
 MasterD---E---F---G---I

Since then, I have I have been cherry-picking changes from master onto 
bioconductor per my understanding of recommended practice.  
If I try to merge bioconductor onto master, or vice versa, I get the unrelated 
histories warning.  Vlad's suggestion works, but results in replaying ~700 
commits onto the bioconductor repo...not so nice maybe.

The https://github.com/Bioconductor-mirror/MAST.git repo is to make SVN commits 
from the git tree.


> On Jul 28, 2017, at 11:33 AM, Turaga, Nitesh  
> wrote:
> 
> I would be careful before using the --allow-unrelated-histories flag. Please 
> investigate where there is a difference.
> 
> Also, i don't understand why you are using the bioconductor-git-mirror? Your 
> non-zero commit history should be related to bioconductor git server. 
> 
> Best
> 
> Nitesh
> 
> Get Outlook for Android
> 
> 
> 
> From: Vladimir Kiselev
> Sent: Thursday, July 27, 5:11 PM
> Subject: Re: [Bioc-devel] git transition for projects with prior git history
> To: McDavid, Andrew, bioc-devel@r-project.org
> 
> 
> Hi Andrew, I solved it by just adding '--allow-unrelated-histories' to force 
> the merge: 
> https://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories
>  Cheers, Vlad On Thu, Jul 27, 2017 at 9:53 PM McDavid, Andrew < 
> andrew_mcda...@urmc.rochester.edu> wrote: > Is there a recommended recipe to 
> utilize the git.bioconductor.org< > http://git.bioconductor.org> remote with 
> an existing git repo that has > non-zero history? I tried adding the 
> git.bioconductor.org< > http://git.bioconductor.org> as a remote, making a 
> branch, and then > checking out a branch on that remote, but it gave my 
> computer sad. Do I > need to clone a new repo instead? > > Example: > $ git 
> remote -vv > bioc https://github.com/Bioconductor-mirror/MAST.git (fetch) > 
> bioc https://github.com/Bioconductor-mirror/MAST.git (push) > biocgit 
> g...@git.bioconductor.org:packages/MAST > (fetch) > biocgit 
> g...@git.bioconductor.org:packages/MAST > (push) > origin 
> g...@github.com:RGLab/MAST.git (fetch) > origin git
 @github.com:RGLab/MAST.git (push > > $ git fetch biocgit > $ git checkout -b 
bgMaster --track biocgit/master > ... > > ... > $ git merge master bgMaster > 
fatal: refusing to merge unrelated histories > > [[alternative HTML version 
deleted]] > > ___ > 
Bioc-devel@r-project.org mailing list > 
https://stat.ethz.ch/mailman/listinfo/bioc-devel > -- http://genat.uk 
[[alternative HTML version deleted]] 
___ 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


Re: [Bioc-devel] git transition for projects with prior git history

2017-07-28 Thread Turaga, Nitesh
I would be careful before using the --allow-unrelated-histories flag. Please 
investigate where there is a difference.

Also, i don't understand why you are using the bioconductor-git-mirror? Your 
non-zero commit history should be related to bioconductor git server.

Best

Nitesh

Get Outlook for Android



From: Vladimir Kiselev
Sent: Thursday, July 27, 5:11 PM
Subject: Re: [Bioc-devel] git transition for projects with prior git history
To: McDavid, Andrew, bioc-devel@r-project.org


Hi Andrew, I solved it by just adding '--allow-unrelated-histories' to force 
the merge: 
https://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories
 Cheers, Vlad On Thu, Jul 27, 2017 at 9:53 PM McDavid, Andrew < 
andrew_mcda...@urmc.rochester.edu> wrote: > Is there a recommended recipe to 
utilize the git.bioconductor.org< > http://git.bioconductor.org> remote with an 
existing git repo that has > non-zero history? I tried adding the 
git.bioconductor.org< > http://git.bioconductor.org> as a remote, making a 
branch, and then > checking out a branch on that remote, but it gave my 
computer sad. Do I > need to clone a new repo instead? > > Example: > $ git 
remote -vv > bioc https://github.com/Bioconductor-mirror/MAST.git (fetch) > 
bioc https://github.com/Bioconductor-mirror/MAST.git (push) > biocgit 
g...@git.bioconductor.org:packages/MAST > (fetch) > biocgit 
g...@git.bioconductor.org:packages/MAST > (push) > origin 
g...@github.com:RGLab/MAST.git (fetch) > origin git@g
 ithub.com:RGLab/MAST.git (push > > $ git fetch biocgit > $ git checkout -b 
bgMaster --track biocgit/master > ... > > ... > $ git merge master bgMaster > 
fatal: refusing to merge unrelated histories > > [[alternative HTML version 
deleted]] > > ___ > 
Bioc-devel@r-project.org mailing list > 
https://stat.ethz.ch/mailman/listinfo/bioc-devel > -- http://genat.uk 
[[alternative HTML version deleted]] 
___ 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.
[[alternative HTML version deleted]]

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


Re: [Bioc-devel] Catching SVN up to Github

2017-07-28 Thread Shepherd, Lori
It seems like you renamed your package after it was submitted based on the 
current version in svn and the current ERROR occurring on the build report.


Could you check your git config -l   and see if the svn-remote* in the config 
file are updated to reflect the naming change?



Lori Shepherd

Bioconductor Core Team

Roswell Park Cancer Institute

Department of Biostatistics & Bioinformatics

Elm & Carlton Streets

Buffalo, New York 14263


From: Bioc-devel  on behalf of Matt Richards 

Sent: Thursday, July 27, 2017 4:36:47 PM
To: bioc-devel@r-project.org
Subject: [Bioc-devel] Catching SVN up to Github

Hi all,

Since our package, "trena", was accepted, we've made some pretty extensive
changes to the package on Github. Our version has so far jumped from
0.99.10 to 0.99.135. These changes are all contained on a forked version of
the Bioconductor mirror, as specified (https://www.bioconductor.org/
developers/how-to/git-mirrors/). We haven't yet put these changes onto SVN.

My question is regarding how to get the Github repo and the SVN on the same
page. I've followed the procedure outlined on the linked page and also
tried the cherry picking procedure, but any `git svn` command
(info/rebase/dcommit) run on the devel branch returns me the same message:

Unable to determine upstream SVN information from HEAD history.

I've also tried a `git svn log`, which returns: fatal: your current branch
appears to be broken

Any ideas what's going on here? I'm a self-admitted novice when it comes to
SVN.

Thanks
Matt

--
Matthew Richards
Postdoctoral Fellow
Institute for Systems Biology

[[alternative HTML version deleted]]

___
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.
[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] Seamless way for a CRAN-bound package to depend on a Bioconductor package?

2017-07-28 Thread Dirk Eddelbuettel

On 28 July 2017 at 12:42, Pavel Krivitsky wrote:
| Dear All,
| 
| There is a Bioconductor package (S4Vectors) whose functionality I want
| to use in one of my packages, which I usually submit to CRAN.
| 
| At this time, install.packages() does not automatically fetch
| dependencies from Bioconductor as far as I can tell, though it can be
| told to do so via setRepostitory().
| 
| Is there any way to make it more seamless for the end-user?

It's there all along, see from the sources (and sorry for the linewrap):

edd@bud:~/svn/r-devel$ cat etc/repositories
## The fields here are tab-delimited: there is a row name
## menu_nameis the name to be used in setRepositories()
## URL  is the base URL (see R-admin.texi)
## default  is whether this should be a default choice
## source, win.binary, mac.binary   indicate if the corresponding type is 
present
##
## BioC entries are version-specific, with %v getting expanded to the
## BioC version associated with the current R version.
## Also, %bm is substituted from the setting of getOption("BioC_mirror")
##
menu_name   URL default source  win.binary  mac.binary
CRANCRAN@CRAN@  TRUETRUETRUETRUE
BioCsoft"BioC software" %bm/packages/%v/biocFALSE   TRUETRUE
TRUE
BioCann "BioC annotation"   %bm/packages/%v/data/annotation FALSE   TRUE
TRUETRUE
BioCexp "BioC experiment"   %bm/packages/%v/data/experiment FALSE   TRUE
TRUETRUE
BioCextra   "BioC extra"%bm/packages/%v/extra   FALSE   TRUETRUE
TRUE
CRANextra   CRAN (extras)   https://www.stats.ox.ac.uk/pub/RWin FALSE
TRUETRUETRUE
OmegahatOmegahathttp://www.omegahat.net/R   FALSE   TRUE
FALSE   FALSE
R-Forge R-Forge https://R-Forge.R-project.org   FALSE   TRUETRUETRUE
rforge.net  rforge.net  https://www.rforge.net  FALSE   TRUETRUE
TRUE
edd@bud:~/svn/r-devel$

But you simply cannot ensure that users have it enabled.

| I know that there is the 'Additional_repositories:' setting, but I
| think that's for R CMD check only: although devtools::install()
| understands it and the 'biocView:' setting, install.packages() does
| not.

You can use that for suggsted packages, see Anderson and Eddelbuettel in the
current issue of the R Journal for more.

| Another option might be to make it a Suggested package and then force
| its installation (if necessary) and loading in the .onLoad() function
| of my package, but it's not clear whether that's CRAN-appropriate
| behaviour.

I'd say it is not.

Dirk
| 
|   Thanks in advance,
|   Pavel
| 
| 
| 
| 
| -- 
| Pavel Krivitsky
| Lecturer in Statistics
| National Institute of Applied Statistics Research Australia (NIASRA)
| School of Mathematics and Applied Statistics | Building 39C Room 154
| University of Wollongong NSW 2522 Australia
| T +61 2 4221 3713
| Web (NIASRA): http://niasra.uow.edu.au/index.html
| Web (Personal): http://www.krivitsky.net/research
| ORCID: -0002-9101-3362
| 
| NOTICE: This email is intended for the addressee named and may contain
| confidential information. If you are not the intended recipient, please
| delete it and notify the sender. Please consider the environment before
| printing this email.
| __
| R-package-devel@r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

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


[R-pkg-devel] Seamless way for a CRAN-bound package to depend on a Bioconductor package?

2017-07-28 Thread Pavel Krivitsky
Dear All,

There is a Bioconductor package (S4Vectors) whose functionality I want
to use in one of my packages, which I usually submit to CRAN.

At this time, install.packages() does not automatically fetch
dependencies from Bioconductor as far as I can tell, though it can be
told to do so via setRepostitory().

Is there any way to make it more seamless for the end-user?

I know that there is the 'Additional_repositories:' setting, but I
think that's for R CMD check only: although devtools::install()
understands it and the 'biocView:' setting, install.packages() does
not.

Another option might be to make it a Suggested package and then force
its installation (if necessary) and loading in the .onLoad() function
of my package, but it's not clear whether that's CRAN-appropriate
behaviour.

Thanks in advance,
Pavel




-- 
Pavel Krivitsky
Lecturer in Statistics
National Institute of Applied Statistics Research Australia (NIASRA)
School of Mathematics and Applied Statistics | Building 39C Room 154
University of Wollongong NSW 2522 Australia
T +61 2 4221 3713
Web (NIASRA): http://niasra.uow.edu.au/index.html
Web (Personal): http://www.krivitsky.net/research
ORCID: -0002-9101-3362

NOTICE: This email is intended for the addressee named and may contain
confidential information. If you are not the intended recipient, please
delete it and notify the sender. Please consider the environment before
printing this email.
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [Rd] Issue with memory deallocation/fragmentation on systems which use glibc

2017-07-28 Thread Dmitriy Selivanov
I would like to submit issue to wishlist at the bug reporting system (
https://www.r-project.org/bugs.html) based on my emails. Unfortunately I
don't have bugzilla account. Can someone from R-core help to obtain it? (I
see that I should *"ask an R Core member to add you manually to R’s
Bugzilla members"*)

   - https://stat.ethz.ch/pipermail/r-devel/2017-June/074487.html
   - https://stat.ethz.ch/pipermail/r-devel/2017-June/074500.html
   - https://stat.ethz.ch/pipermail/r-devel/2017-July/074614.html


2017-07-09 13:12 GMT+03:00 Dmitriy Selivanov :

> Dear R-devel mailing list and especially R-core, is there any chance to
> receive feedback on issue I described in previous emails? I would consider
> such behaviour as a bug.
>
> As a work-around I've created small "clean-up" function:
>
> malloc_trim_finalizer = function(e) {
>   res = NULL
>   if(R.version$os == "linux-gnu") {
> flog.debug("Calling malloc_trim(0L) to trigger glibc to release
> memory\n")
> res = malloc_trim(0L)
>   }
>   res
> }
>
> And at the end of each function which produce a lot of intermediate small
> objects I provide it to reg.finalizer():
> some_function = function(...) {
>   # do some useful work
>   result = TRUE
>   # register finalizer
>   e = environment()
>   reg.finalizer(e, malloc_trim_finalizer)
>   return(result)
> }
>
> 2017-06-22 11:12 GMT+04:00 Dmitriy Selivanov 
> :
>
>> A few additional details. According to Linux Programmer's Manual
>>
>>1. http://man7.org/linux/man-pages/man3/mallopt.3.html
>>2. http://man7.org/linux/man-pages/man3/malloc_trim.3.html
>>
>> And if I understood everything correctly `free` could trigger
>> `malloc_trim` based on value of several environment variables -
>> MALLOC_TOP_PAD_ and MALLOC_TRIM_THRESHOLD_. However setting them as low as
>> 1 or 0 doesn't have any effect (but as I wrote in previous email manual
>> call of `malloc_trim` helps to release memory).
>>
>
>
>
> --
> Regards
> Dmitriy Selivanov
>



-- 
Regards
Dmitriy Selivanov

[[alternative HTML version deleted]]

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