similar to: Activating a Regular Binding

Displaying 20 results from an estimated 10000 matches similar to: "Activating a Regular Binding"

2020 May 24
1
Surpising behavior when using an active binding as loop index in R 4.0.0
A shorter reproducible example: example(makeActiveBinding) for (fred in 1:3) { 0 } ls() Both problems go away if you first do compiler::enableJIT(2) So looks like a bug in compiling the for loop. -Deepayan On Sat, May 23, 2020 at 5:45 PM Thomas Friedrichsmeier via R-devel <r-devel at r-project.org> wrote: > > Possibly just a symptom of the earlier behavior, but I'll amend my
2020 May 23
2
Surpising behavior when using an active binding as loop index in R 4.0.0
Hi, I stumbled upon a surprising behavior when using an active binding as a loop index variable in R 4.0.0. In contrast, the behavior observed in R 3.6.1 is in line with my expectations. Consider the code below: makeActiveBinding("i", function(value) { if (missing(value)) { x } else { print("set") x <<- value } }, globalenv()) i <- 1 # output
2010 Jan 06
1
MakeActiveBinding help needed
Hi, I wanted a Q&D way to open a new graphics window but keep the focus in the console window (under Windows and the Rgui), so I wrote a line into my Rprofile.site file as follows: invisible(makeActiveBinding('newdev', function(...) dev.new(restoreConsole=T), .GlobalEnv)) (That is all on one line, incase the mailer re-parses it). This gives me a command "newdev" which
2020 May 23
0
Surpising behavior when using an active binding as loop index in R 4.0.0
Possibly just a symptom of the earlier behavior, but I'll amend my example, below, with an even more disturbing observation: Am Sat, 23 May 2020 13:19:24 +0200 schrieb Thomas Friedrichsmeier via R-devel <r-devel at r-project.org>: [...] > Consider the code below: > > makeActiveBinding("i", > function(value) { > if (missing(value)) { > x > } else {
2007 Mar 28
1
checking existence of active bindings
Is there any way to check whether an active binding exists without actually calling the active binding? I'd like to be able to do something like exists("x", ...) and know whether "x" exists without actually fetching its value if it is an active binding (because it could consume significant resources to fetch the value). The documentation for exists() doesn't
2011 Mar 15
1
install.packages barfs on dependencies= argument
I'm sure I used to be able to do my.dependencies<- c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances") install.packages("animation", lib = Sys.getenv("R_LIBS_USER"), dependecies = my.dependencies) but now I get Error in download.file(url, destfile, method, mode = "wb", ...) : unused argument(s)
2011 Mar 27
0
model diagnostics for MatrixModels
Dear list, I have been working with the MatrixModels package quite a bit this week, and it is proving to be extremely valuable for my current work (I am working with several factors with many levels, leading to a sparse model matrix). However, as my knowledge of statistical theory leaves much to be desired, there are certain aspects of model evaluation etc that I am having trouble with. Has
2009 Nov 05
2
Active bindings in attached environments
Hi, I was wondering if this is expected behavior for active bindings in attached environments, or if this is a bug: > e <- new.env() > makeActiveBinding('x',function() 'foo',e) > ls(e) [1] "x" > attach(e) > search() [1] ".GlobalEnv" "e" "package:graphics" [4] "package:grDevices"
2013 Nov 16
2
serialization for external pointers
Hello, Are there any recipe to handle serialization / deserialization of external pointers. I'm thinking about something similar in spirit to the way we handle finalization of external pointers. Currently, if we create an external pointer, save the session, quit R, then load the session, we get a null pointer. One way I'm thinking of is to have an environment in the
2009 Jun 29
1
active bindings and ls.str
Hello, Should active binding appear as such in ls.str. > makeActiveBinding( "xx", function(arg){ Sys.sleep(10) }, .GlobalEnv ) > ls.str() # takes 10 seconds xx : NULL What we see here is the result of the "setter" of the binding. I'm attaching a patch that prints this instead: > ls.str() xx : <active binding> Although a better behaviour would be to
2011 Mar 13
2
Problems getting html files out of R CMD check
Hi, I'm trying to R CMD check a package, however I have hit a snag. There seems to be a problem with the creation of the /html files (the only file that's constructed here is the 00Index.html). I've tested each of the .Rd files independently with R CMD Rdconv, they all happily create html files without complaint. R CMD check <package> gives the no warnings. I'm therefore
2011 Apr 11
1
RExcel
Hi, I am installing Excel using package "RExcelInstaller". When I tried to run installRExcel() I got this error message: You don not have the R package rcom installed. The (D)COM server installed which will aloow you to use the background server in RExcel. Since rcom is not installed, foreground mode will be unavailable. You may continue with the installation, but in most
2011 Jul 06
1
trouble parsing a date using strptime()
Hi, I am having a trouble parsing dates using strptime() that I get in the format of year and week number. The data looks like this "201127" which means year 2011 and week 27. I would like to graph this using ggplot but then I get a gap between 201054 and 201101 so I thought I would just easily convert it. I tried to use strptime and as.Date and the format string of %Y%W but it seems
2011 Apr 19
1
self-referential representations in S4
I'm trying to do the following: > setClass("MyNode", representation(parent = "MyNode")) [1] "MyNode" Warning message: undefined slot classes in definition of "MyNode": parent(class "MyNode") I scanned the docs, but found nothing. The representation function has no problem, it's the setClass function which gives the warning. What
2011 Mar 21
1
Help with POSIXct
I rarely work with dates in R, so I know very little about the POSIXct and POSIXlt classes. I'm importing an excel file into R using the RODBC package, and am having issues reformatting the dates. 1. The important info: > sessionInfo() R version 2.12.2 (2011-02-25) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United
2011 Oct 13
1
bootstrap means by strata
All - I have an uneven set of replicates and would like to sample from this set X number of times to generate a mean for each grouping variable. I was thinking the boot package would be the thing to use, but now I'm not so sure ... given the discussion here: http://finzi.psych.upenn.edu/Rhelp10/2010-June/243828.html Given these data (a small subset): > dput(x) structure(list(numSpp
2011 May 07
1
Cannot read in a csv file.
Can anyone suggest why this file http://www.mediafire.com/?afeyhhpacaq is refusing to open for me.? I must admit I don't know all its history but the original data was taken from an OOo spreadsheet that I edited (good bit of copying and pasting and the month variable added by hand in OOo Calc) and, then,saved as a csv file. It was not originally an English language file as far as I can
2005 Apr 06
1
makeActiveBinding warning
A while ago Luke Tierney remarked that the warning associated with 'makeActiveBinding'-- "saved workspaces with active bindings may not work properly when loaded into older versions of R"-- should probably be removed in R-devel. It's still cropping up *sporadically* with R-alpha of 3/4/2004, but not every time I call 'makeActiveBinding'. So, two questions: (i) is it
2011 Jul 10
2
sort infelicity
Hello: sort(c('A', 'b', 'C')) seems to produce different answers in R interactive than in "R CMD check", at least under both Fedora 13 and Windows 7 with Windows 7 sessionInfo() copied below: In interactive, the result is c('A', 'b', 'C'); with R CMD check, it is c('A', 'C', 'b'). This produced
2011 Jun 24
0
reshape: cast(x, a ~ b ~ .) vs. cast(x, a ~ b) difference
Hi, I have a problem with understanding what the function cast() from the package reshape is doing. In the example below I have a 2x2x2 array which I first melt and then cast to get the averages over the field 'strain' for every combination of the fields 'treatement' and 'gene': ------ > mdat <- melt(array(rnorm(8), dim=c(2,2,2),