[Rd] specifying name in the error message "promise already under evaluation"

2017-09-17 Thread Scott Kostyshak
Consider the following R code:

abc <- function(x, y = y) {
  x + y
}

abc(x = 3)

which gives the following error:

promise already under evaluation: recursive default argument
reference or earlier problems?

If you google that error, you will find that it usually refers to the
situation given in the example above, although I'm sure the error is
more general and could be triggered in other situations.

I'm trying to think about how to improve the error for the most common
situation that triggers it. One simple way would be to give the name of
the promise. For example, I think that the following would already be an
improvement:

promise "y" already under evaluation: recursive default argument
reference or earlier problems?

Any thoughts?

Scott


-- 
Scott Kostyshak
Assistant Professor of Economics
University of Florida
https://people.clas.ufl.edu/skostyshak/

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


Re: [Rd] R-devel object header changes that require reinstalling packages

2017-09-17 Thread Jeroen Ooms
On Tue, Sep 12, 2017 at 8:28 PM,   wrote:
> (https://svn.r-project.org/R/branches/ALTREP/ALTREP.html outlines the
> framework).

Thank you for the nice writeup, hope this makes it into the R journal.
The spelling package finds a few typos:

> spelling::spell_check_files('ALTREP.md', lang = 'en_US')

  WORD  FOUND IN
abstrct   altrep.md:39
attemps   altrep.md:776
defernaltrep.md:767
hanling   altrep.md:699
representaitons   altrep.md:21

 (omitting false positives)

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


Re: [Rd] R Configuration Variable: Maximum Memory Allocation per R Instance

2017-09-17 Thread Jeroen Ooms
On Sun, Sep 17, 2017 at 12:39 AM, Juan Telleria  wrote:
> Dear R Developers,
>
> In the same way that MySQL/MariaDB's Engine InnoDB or MyISAM/Aria have the
> innodb_buffer_pool_size or the key_buffer_size for setting the maximum
> amount of RAM which can be used by a Server Instance.

Memory is not controlled by R itself because packages may malloc()
directly. However most operating systems have features to limit
resources of a given process. The CRAN package 'unix' has wrappers for
posix setrlimit [1] e.g. unix::rlimit_as() limits address space. This
works pretty well, however I found that the way memory is managed and
counted varies a lot per OS and malloc implementation.

You can also set rlimits on a single evaluation via the rlimit
parameter in sys::eval_safe().


[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/getrlimit.html

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


Re: [Rd] R Configuration Variable: Maximum Memory Allocation per R Instance

2017-09-17 Thread Juan Telleria
This variables already exist as I have been said, and are:
* memory.size
* memory.limit

R Documentation:

https://stat.ethz.ch/R-manual/R-devel/library/utils/html/memory.size.html

Thank you,
Juan

El 17/9/2017 12:39 a. m., "Juan Telleria"  escribió:

> Dear R Developers,
>
> In the same way that MySQL/MariaDB's Engine InnoDB or MyISAM/Aria have the
> innodb_buffer_pool_size or the key_buffer_size for setting the maximum
> amount of RAM which can be used by a Server Instance:
>
> ¿Would it be possible to create an R Configuration Variable which fixes
> the maximum amount of RAM memory to be used as Commit / Dynamic Memory
> Allocation?
>
> Thank you.
> Juan
>

[[alternative HTML version deleted]]

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

Re: [Rd] R Configuration Variable: Maximum Memory Allocation per R Instance

2017-09-17 Thread Mark van der Loo
Dear Juan,

I'm not deeply familiar with the DB's you mention but it seems to me that
me that 'memory.limits' does what you want on one OS and you can use shell
commands to limit R's memory usage for *nix-alike systems (see
?memory.limits). Also, Jeroen Ooms wrote a nice article about this in the
JSS: https://www.jstatsoft.org/article/view/v055i07 . There's also a
package for it: RAppArmor.

-M




Op zo 17 sep. 2017 om 00:39 schreef Juan Telleria :

> Dear R Developers,
>
> In the same way that MySQL/MariaDB's Engine InnoDB or MyISAM/Aria have the
> innodb_buffer_pool_size or the key_buffer_size for setting the maximum
> amount of RAM which can be used by a Server Instance:
>
> ¿Would it be possible to create an R Configuration Variable which fixes the
> maximum amount of RAM memory to be used as Commit / Dynamic Memory
> Allocation?
>
> Thank you.
> Juan
>
> [[alternative HTML version deleted]]
>
> __
> 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