avior from 2018:
https://stat.ethz.ch/pipermail/r-devel/2018-April/075883.html
Note that that report did not mention encodings being an issue;
perhaps the original bug was fixed for native encoding only?
Peter Meilstrup
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
R developers,
I am trying to track down a memory leak in my R package.
I have a complex object O which comprises a lot of closures and such.
Among which, the object uses an environment E to perform computations
and keep intermediate values in. When O closes/finishes with its task
it nulls out
Interestingly,
as.list(substitute(...()))
also works.
On Sun, Aug 12, 2018 at 1:16 PM, Duncan Murdoch
wrote:
> On 12/08/2018 4:00 PM, Henrik Bengtsson wrote:
>>
>> Hi. For any number of *known* arguments, we can do:
>>
>> one <- function(a) list(a = substitute(a))
>> two <- function(a, b)
For 2), it is not exposed in R's standard library but it is exposed in
the Rinternals API. A promise that is forced in normal evaluation will
have PRENV set to NULL.
Peter
On Tue, Jan 2, 2018 at 4:19 PM, Evan James Patterson
wrote:
> Hello R experts,
>
>
> I plan to
AFAIK there is not supposed to be any user level code that depends on the
existence of *tmp*, but there are knock-on effects (evaluating code in a locked
environment can succeed with byte code and fail with the interpreter, for
instance)
Peter
On Aug 14, 2014, at 14:35, Michael Haupt
Hi all,
Is there any particular reason Rf_ddfindVar is not exposed in Rinternals.h?
Peter
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Because depends is treated incorrectly (if I may place a value
judgement on it). I had an earlier thread on this, not sure if any
changes have taken place since then:
http://r.789695.n4.nabble.com/Dependencies-of-Imports-not-attached-td4666529.html
On Mon, Feb 10, 2014 at 5:53 PM, Kirill Müller
Try the function parseNamespaceFile in base. Not documented but its
output should be understandable.
Peter
On Tue, Jan 21, 2014 at 5:41 AM, Markus Müller
markus.mueller@gmail.com wrote:
For the purpose of automatic documentation, I want to parse a NAMESPACE
file of the package to be
On Fri, Jan 17, 2014 at 12:43 AM, Gabriel Becker gmbec...@ucdavis.edu wrote:
There were some deeper issues with what you asked, though. Sourcing an R
file will have no effect on a package in the namespace at all unless you
are using something like ESS's developer mode which sources the file
I've found 'while', 'for', 'if' and '=' appearing as the class of
what would ostensibly be call objects, as well. (Came across this
because I was using S3 dispatch to help do code-walking syntax
transformations)
I can't find where it is happening in R source, but it seems
significant that they
Is this expected behavior, and if so, why? I would have expected
neither 'arg' nor 'value' to evaluate until forced.
`test-` - function(obj, arg, value) {
1 #force no args
}
x - 1
test(x, print(evaled arg)) - print(evaluated value)
## [1] evaluated value
Peter
There's also knit_expand() in knitr, which uses the form pi = {{pi}}
with general expressions.
Peter
On Tue, Dec 17, 2013 at 1:44 PM, Henrik Bengtsson h...@biostat.ucsf.edu wrote:
Hi,
I'm try to collect a list of methods/packages available in R for doing
in-string variable/symbol
In R code, get(..., environment()) will retrieve the DOTSXP object.
So another way is to write your wrapper functions like
someFunc - function(...) {
.External(someFunc_extern, get(..., ifnotfound=NULL) )
}
If you're trying to mimic what substitute() et al do, you'll sometimes
need to follow a
eval() tends to be able to convince normal functions of where they are
executing, but primitive functions use different methods to get their
evaluation context and aren't as easily fooled. It turns out do.call()
works better on primitive functions, and it will work for on.exit.
However I wasn't
I think this is not the right approach -- quoting is a transport-layer
feature of the CSV format, not part of the application layer. Quotes
should always be interpreted away from column data before any data is
handed to the application layer. (CSV does not _have_ any application
layer; type
On Fri, Oct 4, 2013 at 9:20 AM, Peter Meilstrup
peter.meilst...@gmail.com wrote:
I think this is not the right approach -- quoting is a transport-layer
feature of the CSV format, not part of the application layer. Quotes
should always be interpreted away from column data before any data
On Mon, Sep 30, 2013 at 8:10 AM, Joris Meys jorism...@gmail.com wrote:
Regardless of whether stored as character is interpreted the R way or the
ASCII way, the point Joshua makes is rather valid. Mainly because
read.table has an argument quote with default value \'. This means that at
least
On Tue, Oct 1, 2013 at 5:50 AM, Peter Meilstrup
peter.meilst...@gmail.com wrote:
On Mon, Sep 30, 2013 at 8:10 AM, Joris Meys jorism...@gmail.com wrote:
Regardless of whether stored as character is interpreted the R way or the
ASCII way, the point Joshua makes is rather valid. Mainly because
Some experimentation with the below function should convince you that the
runtime of the bit inside sys.time is proportional to size*number*times. I
think it should only be proportional to number*times. The function is only
manipulating a list of references to vectors and not trying to make
It would be nice if the functionality of importFrom() and import() were
available to user level code, rather than just to people building packages
for distribution. One most often encounters namespace conflicts at the user
level, when loading two packages that have no logical connection other than
Reading R Internals made me believe that R_UnboundValue was a placeholder
that would be skipped over in variable lookup. viz. the section of R
Internals Hash tables says items are not actually deleted but have their
value set to R_UnboundValue., which seems to align with what I read in
envir.c.
I agree that the present behavior of withVisible is the Right Thing, but
the documentation is confusing. The documentation claims that withVisible
evaluates an expression.
This may capture an inside view of how the .Internal function is
implemented, but is nonsense from the R user's standpoint,
-project.orgwrote:
On Aug 15, 2013, at 3:06 AM, Gabriel Becker wrote:
On Wed, Aug 14, 2013 at 11:14 PM, Peter Meilstrup
peter.meilst...@gmail.com
wrote:
I agree that the present behavior of withVisible is the Right Thing, but
the documentation is confusing. The documentation claims
On Thu, Aug 15, 2013 at 5:59 AM, Simon Urbanek
simon.urba...@r-project.orgwrote:
Note that this is documented very explicitly:
eval evaluates its first argument in the current scope before passing it
to the evaluator
But the same man page also describes eval like this:
'eval' evaluates
Not anything that complicated -- your answer is in the R language
definition under 'Subset assignment' and the part in Function calls that
describes assignment functions.
Whenever a call is found on the left side of a `-`, it is munged by
sticking a - on the function name and pulling out the
On Wed, Jul 17, 2013 at 10:20 AM, Ben Bolker bbol...@gmail.com wrote:
Brian Rowe rowe at muxspace.com writes:
Thanks for the lead. Given the example in ?missing though,
wouldn't it be safer to explicitly define a
default value of NULL:
myplot - function(x, y=NULL) {
The formal list for subset.data.frame accepts a ...
args(subset.data.frame)
function (x, subset, select, drop = FALSE, ...)
NULL
But it appears that subset.data.frame does not actually use the ... or
pass it along:
... %in% all.names(body(subset.data.frame))
[1] FALSE
Is there any reason why
When complex assignments are performed, the R interpreter creates, then
removes a special variable *tmp*. However, when byte compiling is enabled,
it seems that a different mechanism for making compound assignments is used.
Would it be possible to eliminate *tmp* from interpreted R code as well?
in the environment from which
f is called. The function does not return x -- it returns a value,
which you can assign as you wish.
So ???
(and apologies if I'm missing something obvious).
Cheers,
Bert
On Sat, Jul 6, 2013 at 9:11 PM, Peter Meilstrup
peter.meilst...@gmail.com wrote:
When
For these programs that use GNU readline, hit Alt-Control-J to switch into
vi-like bindings.
On Jul 5, 2013, at 16:42, Brian Lee Yung Rowe r...@muxspace.com wrote:
That is a more accurate statement regarding Ctrl-K. Nonetheless whatever is
killed can be yanked back via Ctrl-Y, so the effect
On Mon, Jul 1, 2013 at 1:51 PM, Terry Therneau thern...@mayo.edu wrote:
afit - anova(lm(conc ~ uptake, CO2))
afit$P
[1] 2.905607e-06 NA
Warning message:
In `$.data.frame`(afit, P) : Name partially matched in data frame
afit$Pr(F)
Error: unexpected '' in afit$Pr(
The second
On Thu, Jun 27, 2013 at 8:49 PM, Ben Bolker bbol...@gmail.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
The lmer() function in the lme4 package has some code of the form
mc - match.call()
mc[[1]] - as.name(lFormula)
lmod - eval(mc, parent.frame(1L))
this is a fairly
On Fri, Jun 28, 2013 at 3:07 PM, Ben Bolker bbol...@gmail.com wrote:
On 13-06-28 03:57 PM, Peter Meilstrup wrote:
Well, once you begin messing with eval.parent(), you _are_ telling R
what environment to work in, and things have the potential to go wrong
at that point because you're telling
On Fri, May 17, 2013 at 2:47 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote:
On 13-05-16 11:17 PM, Peter Meilstrup wrote:
On Thu, May 16, 2013 at 6:06 AM, McGehee, Robert
Robert.McGehee@geodecapital.**com robert.mcge...@geodecapital.com
wrote:
Duncan, Thank you for the clarification
On Thu, May 16, 2013 at 6:06 AM, McGehee, Robert
robert.mcge...@geodecapital.com wrote:
Duncan, Thank you for the clarification on how delayedAssign works. Should
R-level interfaces to promise objects ever become available, I expect they
would at time come in handy.
On the subject of
Encountered an error in scripting, which can be reproduced using Rscript as
follows:
$ Rscript -e library(httr); handle('http://cran.r-project.org')
Error in getCurlHandle(cookiefile = cookie_path, .defaults = list()) :
could not find function getClass
Calls: handle - getCurlHandle
or by
This thread is strange for me to read as I've been getting completion of
object names, function arguments names, and whatnot in ESS buffers for as
long as I can have been using it. And I'm only on ESS 12.09.
Perhaps you need to set `ess-use-R-completion` to non-nil. Or check the
value of
There is already a mirror on GitHub at https://github.com/wch/r-source .
Peter
On Mar 16, 2013, at 11:17, Laurent Gautier lgaut...@gmail.com wrote:
Hi,
I have been looking at mirroring the SVN R repository into a DVCS (Mercurial,
Git, bzr, etc...).
The idea would be to have that as an
It probably shouldn't be, but It's possible to bind a value to the missing
symbol:
x - environment()
eval(substitute(x$y - wat, list(y = quote(expr=
ls()
eval(quote(expr=))
I don't see a way to remove such a binding though.
Peter
On Tue, Feb 19, 2013 at 5:03 AM, peter dalgaard
- function(..., capture) {
capture(...)
}
f1(x=1, q=, capture=capture_subst)
f1(x=1, q=, capture=capture_match)
On Wed, Jan 23, 2013 at 3:08 PM, Peter Meilstrup
peter.meilst...@gmail.comwrote:
Hi R-devel. Is the following behavior in g1() and h1() expected? It seems
to make ... arguments
Hi R-devel. Is the following behavior in g1() and h1() expected? It seems
to make ... arguments work slightly differently from named arguments.
#missing() has the property that it looks up the chain
#for example, z can be missing in f3 even if
#that argument did have a name (y) in f2
f1 -
Within I'm using an environment as a hashtable to cache the results of some
repeated computations in a package. The thing is that the contents of the
cache will not be valid across R sessions, so I would like to make sure
that the cache is cleared if the user saves or restores the workspace (or
On Tue, Jan 15, 2013 at 4:55 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote:
On 13-01-15 7:39 PM, Peter Meilstrup wrote:
Within I'm using an environment as a hashtable to cache the results of
some
repeated computations in a package. The thing is that the contents of the
cache
OK. Based on comments in serialize.c, this sort of thing isn't
available(yet). However, I also came to the conclusion that for my purposes
(caching functions-of existing R objects) I might implement the cache not
with an environment but with the weak-reference facility exposed in the C
interfaces.
On Thu, Oct 4, 2012 at 6:12 PM, Bert Gunter gunter.ber...@gene.com wrote:
The R Language definition manual explains all of this. Read it.
I always reread that before I post to this list.
The only relevant mention of missing in the R Language Definition
that I could find were in section 4.1.2 on
On Wed, Oct 3, 2012 at 7:47 AM, Hadley Wickham h.wick...@gmail.com wrote:
There is: it is `function`. The parser converts your function definitions
into a call to it. (It has 3 arguments: the formals, the body, and the
srcref. The environment is added when it is evaluated.)
So your
This is tangentially related to Hadley's question.
Suppose I'm building a function programmatically; I have assembled an
expression for the body and I know the names of the arguments it wants
to take.
Suppose I have some convenience function such that writing
make_function(alist(a=, b=),
My guess would be that it's a matter of having swap space be a dedicated
partition or fixed-size file (Linux, usually) versus swapping to a regular
file that grows as needed (Windows and OS X, usually.) So if you
defragmented your drive and set Windows to have a fixedsize swap file, it
would
48 matches
Mail list logo