Displaying 20 results from an estimated 10000 matches similar to: "An inconsistency with promise in attributes"
2012 Oct 08
4
Capturing environment associated with a promise
Hi all,
It's possible to capture the expression associated with a promise
(using substitute). Is there any way to capture the environment
associated with a promise? Similarly, is there any way to tell if
something is a promise without accidentally evaluating it?
Thanks!
Hadley
--
RStudio / Rice University
http://had.co.nz/
2007 Sep 24
1
Inspecting promises
Is there some way of displaying the expression and evaluation environment
associated with a promise? I have found the following:
> # first run these two commands to set up example
> e <- new.env()
> delayedAssign("y", x*x, assign.env = e)
> # method 1. shows expression but not evaluation environment
> str(as.list(e))
List of 1
$ y: promise to language x * x
>
2012 May 22
2
how to remove the 'promise' attribute of an R object (.Random.seed)?
Hi,
The problem arises when I lazyLoad() the .Random.seed from a
previously saved database. To simplify the process of reproducing the
problem, see the example below:
## this assignment may not really make sense, but illustrates the problem
delayedAssign('.Random.seed', 1L)
typeof(.Random.seed)
# [1] "integer"
rnorm(1)
# Error in rnorm(1) :
# .Random.seed is not an integer
2012 May 22
2
how to remove the 'promise' attribute of an R object (.Random.seed)?
Hi,
The problem arises when I lazyLoad() the .Random.seed from a
previously saved database. To simplify the process of reproducing the
problem, see the example below:
## this assignment may not really make sense, but illustrates the problem
delayedAssign('.Random.seed', 1L)
typeof(.Random.seed)
# [1] "integer"
rnorm(1)
# Error in rnorm(1) :
# .Random.seed is not an integer
2000 Feb 02
1
Large data sets and aggregation
I've noticed quite a few messages relating to large data sets bedeviling
R users, and having just had to program my way through one that actually
caused a "Bus error" when I tried to read it in, I'd like to ask two
questions.
1) Are there any facilities for aggregation of data in R?
( I admit that this will not do much for the large data set problem
immediately)
2) Is there any
2012 Nov 22
2
BibTeX entries in CITATION file
Dear List,
While trying to define a customised CITATION file for a package,
following R-exts, I realised that if I use only one 'citEntry' I got
both a text description and a BibTex entry for the package, as for the
'nlme' package:
--------------------------
citation('nlme')
To cite package 'nlme' in publications use:
Jose Pinheiro, Douglas Bates, Saikat
2003 Oct 09
1
An artifact of base being namespace
Function in the base library of R 1.8.0 seems to use a search path with
base coming before the local environment. I think this is intentional
and is related to base being a namespace.
> log <- function(x, base) 200
> log(1)
[1] 200
> log10
function (x)
log(x, 10)
<environment: namespace:base>
> log10(1)
[1] 0
>
This is most problematic when you are creating a
2017 Sep 18
2
issue with promises for time parameter of rep()
Greetings,
The following is based on a question I raised on Stackoverflow:
https://stackoverflow.com/questions/46280120/calling-printls-str-in-function-affect-behavior-of-rep/46283979#46283979
Start a new R session with an empty Global Env. Then define:
f <- function(n) {
print(ls.str())
rep("hello", times = n)
}
Now run:
f(x)
Instead of getting the expected "object
1999 Nov 03
3
bug in Rdconvlib.pl converting to latex (PR#311)
If .../<pkg>/man/ contains a filename beginning with [, such as
[.datetimes, Rdconvlib.pl cannot convert that help file into latex at
INSTALL time. [Using --no-latex is a workaround.]
The error given is:
# R INSTALL ssCatalogues
:
help
>>> Building/Updating help pages for package `ssCatalogues'
Formats: text html latex example
/^[.datetimes$/: unmatched [] in regexp at
2024 Mar 08
1
Function environments serialize to a lot of data until they don't
Hello R-help,
I've noticed that my 'parallel' jobs take too much memory to store and
transfer to the cluster workers. I've managed to trace it to the
following:
# `payload` is being written to the cluster worker.
# The function FUN had been created as a closure inside my package:
payload$data$args$FUN
# function (l, ...)
# withCallingHandlers(fun(l$x, ...), error =
2024 May 11
1
R hang/bug with circular references and promises
The following code snippet causes R to hang. This example might be a
bit contrived as I was experimenting and trying to understand
promises, but uses only base R.
It looks like it is looking for "not_a_variable" recursively but since
it doesn't exist it goes on indefinitely.
x0 <- new.env()
x1 <- new.env(parent = x0)
parent.env(x0) <- x1
delayedAssign("v",
2024 May 11
1
[External] R hang/bug with circular references and promises
On Sat, May 11, 2024 at 9:34?AM luke-tierney--- via R-devel
<r-devel at r-project.org> wrote:
>
> On Sat, 11 May 2024, Travers Ching wrote:
>
> > The following code snippet causes R to hang. This example might be a
> > bit contrived as I was experimenting and trying to understand
> > promises, but uses only base R.
>
> This has nothing to do with promises.
2005 Mar 11
3
delay() has been deprecated for 2.1.0
After a bunch of discussion in the core group, we have decided to
deprecate the delay() function (which was introduced as "experimental"
in R 0.50). This is the function that duplicates in R code the
delayed evaluation mechanism (the promise) that's used in evaluating
function arguments.
The problem with delay() was that it was handled inconsistently (e.g.
sometimes you would see
2001 Mar 21
1
Is there any help for "Cannot allocate vector size of xxx KB"
Forgive me if this isn't relevant, but: are you stripping off the output you
need (e.g., parameter estimates) and throwing away what you don't (e.g.,
residuals)?
Reid Huntsinger
-----Original Message-----
From: Saikat DebRoy [mailto:saikat at stat.wisc.edu]
Sent: Wednesday, March 21, 2001 12:15 PM
To: Han Lai
Cc: R-help
Subject: Re: [R] Is there any help for "Cannot allocate vector
2012 May 31
1
anova of lme objects (model1, model2) gives different results depending on order of models
Hello-
I understand that it's convention, when comparing two models using the
anova function anova(model1, model2), to put the more "complicated" (for
want of a better word) model as the second model. However, I'm using lme
in the nlme package and I've found that the order of the models actually
gives opposite results. I'm not sure if this is supposed to be the case
2008 Jan 03
2
confidence interval too small in nlme?
Hello,
I am interested in using nlme to model repeated measurements, but I don't seem
to get good CIs.
With the code below I tried to generate data sets according to the model given
by equations (1.4) and (1.5) on pages 7 and 8 of Pinheiro and Bates 2000 (having
chosen values for beta, sigma.b and sigma similar to those estimated in the
text).
For each data set I used lme() to fit a model,
2008 Nov 24
1
FW: read.ssd
Did not seem to reach Saikat DebRoy, this might be the forum.
Bendix
-----Original Message-----
From: BXC (Bendix Carstensen)
Sent: 24. november 2008 15:00
To: 'saikat at stat.wisc.edu'; 'stvjc at channing.harvard.edu'
Subject: read.ssd
It's always annoyed me that that read.ssd crashed on datasets with long variable names, but the other day a collegue of mine pointed out to
2002 May 08
1
Questions about S4 style methods and generics
I have some questions about S4 style methods and generics.
First of all, is there any way of using default values for arguments
in the generics/methods? My own experiments show that such arguments
are always ignored. The green book seems to be silent on this
matter.
The second question is about using a non-trivial function body for
generics. Page 351 of the green book gives an example of this
2005 Mar 17
1
"RMySQL for R 2.0.1"
Dear List,
RMySQL is old and wouldn't install on R 2.0.1.
How should the source be rewritten to be accepted by R 2.0.1.
With thanks
Fredrik Lundgren
2015 Feb 26
3
iterated lapply
Would introducing the new frame, with the call to local(), cause problems
when you use frame counting instead of <<- to modify variables outside the
scope of lapply's FUN, I think the frame counts may have to change. E.g.,
here is code from actuar::simul() that might be affected:
x <- unlist(lapply(nodes[[i]], seq))
lapply(nodes[(i + 1):(nlevels - 1)],