similar to: Assignment of structures on a given environment]

Displaying 20 results from an estimated 3000 matches similar to: "Assignment of structures on a given environment]"

2001 Oct 16
4
Assignment of structures on a given environment
Hi, In order to avoid deep copies by passing large arguments to functions or returning values, I'm trying to do the assignment of variables in a given environment. The problem is when I try to assign a structure: a list for example. If I have: ind <- c("a","b") my idea is doing something like l <- alist() l[ind] <- as.list(c(20,40)) in a given
2003 Apr 01
1
Load and unload libraries
Hi all, I'm having some problems in loading libraries. I wonder if anyone can help me with this. I have created two libraries with the same name at different locations. I want to use both of them, one at a time. So I do: library(mylib,lib.loc1) (....) detach('package:mylib') library(mylib,lib.loc2) The problem is that, after this, the used library is still the one first loaded.
2013 May 29
0
Lista aprovados Maravilha
Lista aprovados Maravilha: Amamba?: ANDERSON BEZERRA MOURAO, LUCAS CAULA ALBUQUERQUE, GEILSON HOLANDA SAMPAIO, RAFAEL FERNANDES, JO?O CARLOS MOREIRA DE CARVALHO, DEBORA CRISTINA SCHNORNBERGER, MARIA MACLENE BEZERRA LIMA, JOAO PEDRO TAVARES MAGALHAES. TAMYRES AMORIM SOUZA, CAIO CESAR FERNANDES LOPES, MAGNUN SANTOS FREDERICO, IAGO SIMOES CALIARI, RITA MARIA SILVA ALMEIDA. Pedreiras. Maravilha,
2020 Jun 01
1
eval and Calling Frames
I ran into an interesting issue with `evalq` (and also `eval(quote(...))`): ???? f <- function() { ?????? list( ???????? sys.parent(1), ???????? evalq(sys.parent(1)), ???????? evalq((function() sys.parent(2))()),? # add an anon fun layer ???????? evalq((function() sys.parent(1))()) ?????? ) ???? } ???? res <- f() ???? str(res) ???? ## List of 4 ???? ##? $ : int 0???????? # sys.parent(1)
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
I think rapply() was changed to act like lapply() in this respect. In R-3.1.3 we got rapply(list(quote(1+myNumber)), evalq, envir=list2env(list(myNumber=17))) #[1] 18 rapply(list(quote(1+myNumber)), eval, envir=list2env(list(myNumber=17))) #Error in (function (expr, envir = parent.frame(), enclos = if (is.list(envir) || : object 'myNumber' not found lapply(list(quote(1+myNumber)),
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
Another aspect of the change is (using TERR's RinR package): > options(REvaluators=list(makeREvaluator("R-3.1.3"), makeREvaluator("R-3.2.0"))) > RCompare(rapply(list(quote(function(x)x),list(quote(pi),quote(7-4))), function(arg)typeof(arg))) R version 3.1.3 (2015-03-09) R version 3.2.0 (2015-04-16) [1,] [1]
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
Bill, Is your conclusion to just update the code and enforce using the most recent version of R? Dayne On Wed, Jul 15, 2015 at 4:44 PM, Dayne Filer <dayne.filer at gmail.com> wrote: > David, > > If you are referring to the solution that would be: > > rapply(list(test), eval, envir = fenv) > > I thought I explained in the question that the above code does not work.
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
On Jul 15, 2015, at 12:51 PM, William Dunlap wrote: > I think rapply() was changed to act like lapply() in this respect. > When I looked at the source of the difference, it was that typeof() returned 'language' in 3.2.1, while it returned 'list' in the earlier version of R. The first check in rapply's code in both version was: if (typeof(object) != "list")
2015 Jul 15
2
bquote/evalq behavior changed in R-3.2.1
David, If you are referring to the solution that would be: rapply(list(test), eval, envir = fenv) I thought I explained in the question that the above code does not work. It does not throw an error, but the behavior is no different (at least in the output or result). Using the above code still results in the x object not being stored in fenv on 3.1.2. Dayne On Wed, Jul 15, 2015 at 4:40 PM,
2004 Jan 15
3
Extracting multiple elements from a list
For a long time I've wanted a way to conveniently extract multiple elements from a list, which [[ doesn't allow. Can anyone suggest an efficient function to do this? Wouldn't it be a sensible addition to R? For example, alist <- list() alist[[1]] <- list() alist[[1]]$name <- "first" alist[[1]]$vec <- 1:4 alist[[2]] <- list() alist[[2]]$name <-
2015 Jul 15
0
bquote/evalq behavior changed in R-3.2.1
I am curious why you used evalq instead of eval in this code. Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Jul 15, 2015 at 11:49 AM, Dayne Filer <dayne.filer at gmail.com> wrote: > Hello, > > I upgraded from 3.1.2 to 3.2.1 and am receiving errors on code that worked > as I intended previously. Briefly, I am using bquote to generate > expressions to modify data.table
2015 Jul 15
3
bquote/evalq behavior changed in R-3.2.1
In 3.1.2 eval does not store the result of the bquote-generated call in the given environment. Interestingly, in 3.2.1 eval does store the result of the bquote-generated call in the given environment. In other words if I run the given example with eval rather than evalq, on 3.1.2 "x" is never stored in "fenv," but it is when I run the same code on 3.2.1. However, the given
2003 Aug 20
0
end-of-loop-timeout problem and submit-bug-report output (resending) (PR#3841)
(Hi, I tried sending this to ess-bugs, but got it bounced back: "user unknown". Hope this isn't too off-topic for ess-help. Scot) I'm using Xemacs 21.4, ess 5.1.24, on Windows 98 SE, with John Fox's configuration files: (http://socserv.mcmaster.ca/jfox/Books/Companion/ESS/index.html) and am getting the end-of-loop-timeout warning message I've seen reported to
2009 Jan 28
1
evaluation revisited
I'm still going over old emails and trying to get my head around evaluation so I'm persistent if nothing else. A while back , an expert sent me below as an exercise in understanding and I only got around to it tonight. I understand some of the output but not all of it and I put "Why not Zero ?" next to the ones that I don't understand based on my reading of the various
2003 Nov 13
1
Can't get Sweave syntax highlighting with Emacs
I can't get Emacs to automatically do syntax highlighting of Sweave files. I have followed Friedrich's suggestion for code to insert into my .emacs file. The complete section from my .emacs file is given below. When I load a *.Snw file, font is white until I press M-x, then the first code and document chunks get highlighted, but not the rest of the file. Latex and Noweb menus are
2013 May 29
0
Aprovados lista publicada Jacuípe
Aprovados lista publicada Jacu?pe: Tangar? da Serra: ANA CAROLINA PINTO COSTA, LISLY KATELLY DE PAULA MARTINS, FRANCISCO HELSON DE LIMA NERES, PAULO RAFAEL PEREIRA SOARES, JO?O CARLOS MOREIRA DE CARVALHO, DAMI?O JOVENAL DOS SANTOS, MARIA GORETTI LIMA FREIRE, JANIMERY BARBOSA DE ABREU MELO. SHYSLAINE ARA?JO BEZERRA, ARIANE SOARES SILVA, LUCAS MOREIRA DIAS, GILSON POLICARPO DE S?, REBECA DE FREITAS
2013 May 29
0
Lista dos aprovados em vestibular Mata Grande
Lista dos aprovados em vestibular Mata Grande: Ang?lica: ANNIBERG CORDEIRO DE SOUZA SILVA, LUCAS FONTENELE SILVA DE CARVALHO, GERLANDE MARIA FERREIRA, RAFAELLA SAMPAIO DE ALENCAR, JO?O CARLOS MOREIRA DE CARVALHO, DENISE ARA?JO JUSTINO, MARIA NIVANEIDE DE ABREU LIMA, JOELMA C?NDIDO DA SILVA. TERESA RAQUEL DE MORAES ANDRADE, CARLA NAYANNE MOREIRA DE SOUZA, MAIRA NOGUEIRA ALVES, IAN VIEIRA LIMA
2006 May 27
0
Correction to ?alist (PR#8904)
Hi, people. ?alist says: 'alist' is like 'list', except in the handling of tagged arguments with no value. As written, this description is misleading. For example: > list(e=3+5) $e [1] 8 > alist(e=3+5) $e 3 + 5 We are not in the situation of tagged arguments with no value, and then, clearly, 'list' and 'alist' behave
2007 May 18
1
subset arg in (modified) evalq
Hi, When using evalq to evaluate expressions within a say data.frame context I often wish there was a 'subset' argument, much like in lm() or any ather advanced regression model. I would be grateful for a tip how to do this. Here is an illustration of what I want: n <- 100 data <- data.frame(x=rnorm(n), y=rnorm(y), z=rnorm(z)) # this works evalq({ i <- 0<x;
2009 Dec 30
1
What am I doing wrong in my loops?
Dear kind list people: I have the following code: >hours [1] "0" "1" "2" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" [16] "16" "17" "18" "19" "20" "21" "22"