Displaying 20 results from an estimated 77 matches for "rappli".
Did you mean:
rapply
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,
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
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
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
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]
2008 Jun 11
7
applying a function recursively
Hi,
I have a question about applying a function recursively through a
list. Suppose I have a list where the different elements have
different levels of recursion:
> test.list<-list("I"=list("A"=c("a", "b", "c"), "B"=c("d", "e", "f"), "C"=c("g", "h", "i")),
+
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)),
2006 Oct 03
2
maybe use voronoi.findrejectsites?
hi all members,
please, i need you help... now a i´m working with veronoi polygons in a
area with projections, but i need cut the polygons left. On other words, i
need cut the polygons in the worked area.
R help say that use the command voronoi.findrejectsites, but in this
command i need put the numbers, any way...this command not cut!! do you
can help me?
Thank you for help me!
José Bustos
2003 Dec 03
2
memory leak (PR#5476)
Full_Name: g. schiessler
Version: 1.8.1
OS: Windows 2000 Pro
Submission from: (NULL) (24.229.106.55)
Appears to be memory leak with
=RApply("qnorm",K56)*-1 function
from within Excel 2000.
Have spreadsheet with between
100 and 500 of above references.
When spreadsheet first opened
system using about 200MB but
very quickly grows to over 600MB
and appears to be unlimited.
Is there
2006 Aug 25
0
zoo: new version 1.2-0
Dear useRs,
the new version 1.2-0 of the zoo package for dealing with regular and
irregular time series data is available from the CRAN mirrors.
This version includes two important changes/enhancements:
- rapply() was re-named to rollapply() because from R 2.4.0 on,
base R provides a function rapply() for recursive (not rolling)
application of functions, which was already described in
2009 Mar 27
0
RExcel rcom Server Loading The Wrong Version of R
Hi,
I'm pretty new to R and VERY new to RExcel. I've just finished setting
it up and I'm having some problems. My first Issue is that if I attempt
to use a function like RApply("sum", A1:A4) from within excel it gives
me an error saying "There seems to be no R process connected to the
server" I can then see an R Console open up and I get a message saying R
2008 Dec 11
2
is there a way to recursilvely lapply
for a simple example:
x <- list()
x[["a"]] <- list(a=c(1,2,3),b=c(3,4,5))
x[["b"]] <- list(a=c(6,7,8),b=c(9,10,11))
lapply(x,sum)
this fails w/
Error in FUN(X[[1L]], ...) : invalid 'type' (list) of argument
Just wondering if I have overlooked something obvious.
one can also do:
lapply(x,lapply,sum)
but that assumes that you already know how many levels
2009 Mar 09
1
detecting NULL in recursive lists
Dear R-users,
How can I detect a NULL in a recursive list?
For a regular list I could use lapply:
> lapply(list(x=NULL), is.null)
$x
[1] TRUE
However that doesn't work for structures like list(list(x=NULL)). I tried rapply but it treats NULL as a list and discards them:
> rapply(list(a=1, b=list(x=NULL)), is.null)
a
FALSE
Any suggestion?
Thank you for your help,
Vadim
Note:
2009 Oct 13
7
lapply() reccursively
Hi all,
I was wondering whether it is possible to use the lapply() function
to alter the value of the input, something in the spirit of :
a1<-runif(100)
a2<-function(i){
a1[i]<-a1[i-1]*a1[i];a1[i]
}
a3<-lapply(2:100,a2)
Something akin to a for() loop, but using the lapply() infrastructure.
I haven't been able to get rapply() to do this.
The reason is that the "real"
2007 Aug 28
7
Excel
A common process when data is obtained in an Excel spreadsheet is to save
the spreadsheet as a .csv file then read it into R. Experienced users
might have learned to be wary of dates (as I have) but possibly have not
experienced what just happened to me. I thought I might just share it with
r-help as a cautionary tale.
I received an Excel file giving patient details. Each patient had an ID
2012 Jun 26
2
flatten lists
I am looking for a function to flatten a list to a list of only 1
level deep. Very similar to unlist, however I don't want to turn it
into a vector because then everything will be casted to character
vectors:
x <- list(name="Jeroen", age=27, married=FALSE,
home=list(country="Netherlands", city="Utrecht"))
unlist(x)
This function sort of does it:
flatlist
2015 Jul 15
3
bquote/evalq behavior changed in R-3.2.1
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 objects within a function, so I need the
changes to actually be stored in the given environment. Previously, I used
code like the following:
test <- list(bquote(x <- 10))
fenv <- environment()
rapply(test,
2010 Nov 09
3
Row-wise recurive function call
Dear Group,
I have a following dataset:
> a
A B C D
1 22 3 31 40
2 26 31 36 32
3 3 7 49 16
4 24 40 27 26
5 20 45 47 0
6 34 43 11 18
7 48 48 24 2
8 3 16 39 48
9 20 49 7 21
10 17 36 47 10
> dput(a)
structure(list(A = c(22L, 26L, 3L, 24L, 20L, 34L, 48L, 3L, 20L,
17L), B = c(3L, 31L, 7L, 40L, 45L, 43L, 48L, 16L, 49L, 36L),
C = c(31L, 36L, 49L, 27L, 47L, 11L, 24L,
2013 Mar 12
2
Bugs due to naive copying of list elements
Several bugs are present in R-2.15.3 and R-alpha due to
naive copying of list elements.
The bug below is due to naive copying in subset.c (with
similar bugs for matrices and arrays):
a<-list(c(1,2),c(3,4),c(5,6))
b<-a[2:3]
a[[2]][2]<-9
print(b[[1]][2])
Naive copying in mapply.c leads to the following bug:
X<-1+1
f<-function(a,b) X
A<-mapply(f,c(1,2,3),c(4,5,6),SIMPLIFY=FALSE)
2012 Apr 11
3
Question on Counting Factors
Hi,
I hope this is not too trivial, but I've had this recurring problem
and I think there is super easy solution, just not sure what it is.
Please see short example below. ?I would like to get the frequency
(counts) of all the variables in a single column (that is easy), but I
would also like to return the value 0 for the absence of variables
defined in another column.
For example:
animals