similar to: lapply() reccursively

Displaying 20 results from an estimated 2000 matches similar to: "lapply() reccursively"

2010 May 20
1
RSpython Ubuntu
Dear List, I'd like to call pyhton function from within R. I tried installing the latest version of RSPython: wget http://www.omegahat.org/RSPython/RSPython_0.7-1.tar.gz R CMD INSTALL --clean RSPython_0.7-1.tar.gz I get a compile error (posted below). Did anyone else run against this ? Is there a solution ? checking for python... /usr/bin/python Python version 2.6 Using threads checking
2006 Feb 28
2
vector math: calculating a rolling 12 row product?
I have a dataframe of numeric values with 30 ?rows? and 7 ?columns?. For each column, beginning at ?row? 12 and down to ?row? 30, I wish to calculate the ?rolling 12 row product?. I.e., within each column, I wish to multiply all the values in row 1:12, 2:13, 19:30. I wish to save the results as a new dataframe, which will have 19 rows and 7 columns.
2010 Jun 09
1
Rglpk
Hi list, in the Rglpk_solve_LP function (::Rglpk), on line 26, the function calls a function as.glp_bounds() that i cannot access. i'm trying to alter the Rglpk_solve_LP function to add a line to retrieve column/row dual values. everytime i change the slightest line of code inside Rglpk_solve_LP() [to even add a print] i get a ': could not find function "as.glp_bounds"'
2012 Mar 05
2
source for function sample() in package base?
Hi all, were can i find the sources for the function sample() (the one from the base package) thanks in advance, -- View this message in context: http://r.789695.n4.nabble.com/source-for-function-sample-in-package-base-tp4447796p4447796.html Sent from the R help mailing list archive at Nabble.com.
2012 Apr 08
2
xyplot() does not plot legends with "relation=free" scales
Hi all, I have this problem with lattice that xyplot() won't draw some of my axis labels if the type (i.e. the relation argument) of scales is set as free. For example, in the plot below, I would want it to also show: 1. the labels E1,...E6 below the 10th panel (i.e. 3rd row, 2 col)....just as it is now done below the 12th panel.... 2. as well as the labels (2,4,6,8) on the top of panels 1
2009 Sep 16
2
Generalized cumsum?
Is there anything like cumsum and cumprod but which allows you to apply an arbitrary function instead of sum and product? In other words, I want a function cumfunc(x, f) that returns a vector, so that for all n up to the length of x cumapply(x,f)[n] = f(x[1:n]) This would give cumsum and cumprod as special cases when f=sum or f=prod. I could write such a function, but I can't see
2008 Aug 18
2
matrix row product and cumulative product
I spent a lot of time searching and came up empty handed on the following query. Is there an equivalent to rowSums that does product or cumulative product and avoids use of apply or looping? I found a rowProd in a package but it was a convenience function for apply. As part of a likelihood calculation called from optim, I?m computing products and cumulative products of rows of matrices with
2010 Feb 26
7
question to make a vector without loop
Hello all, I want to define a vector like w[k+1]=w[k]*a/(b+k) for k=1,...,N-1 without use loop. Is it posible to do in R? Regards khazaei
2009 Oct 29
2
fast cumulative matrix multiplication
Hi all, I am looking for a function like cumprod() that works for matrix multiplication. In other words, I have matrices [M1, M2, ..., Mn], and I want to calculate [M1, M1%*%M2, M1%*%M2%*%M3, ..., M1%*%...%*%Mn] as quickly as possible. Right now I'm using a for() loop but it seems like there should be a faster way. Any help is appreciated! Thanks, Todd Schneider todd.w.schneider@gmail.com
2005 Jul 12
1
allocation of large matrix failing
Hello, this is probably something silly which I am doing, but I cannot understand why this allocation is not happening. Here is a my C code which tries to allocate a list of size 333559, and then a matrix of size 8*333559 I thought I might be running into memory problems, but R is not even using that much (I start R with more memory and it stays constant) Also, I start R as I normally do and I
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")
2011 Nov 27
1
generating a vector of y_t = \sum_{i = 1}^t (alpha^i * x_{t - i + 1})
Dear R-help, I have been trying really hard to generate the following vector given the data (x) and parameter (alpha) efficiently. Let y be the output list, the aim is to produce the the following vector(y) with at least half the time used by the loop example below. y[1] = alpha * x[1] y[2] = alpha^2 * x[1] + alpha * x[2] y[3] = alpha^3 * x[1] + alpha^2 * x[2] + alpha * x[3] ..... below are
2010 Aug 25
1
(no subject)
Hi I am using repeated meaturement data for my project and I want to use quantile regression with multilevel or panel data in "R." I dont find the basic version of software in R, so I have difficulty in using it. I would also appreciate if anyone more proficient in R could help me how to run this. best wishes  M.A-Vakili Department of Biostatistics Faculty of Medicine Shiraz/Iran
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 Mar 22
1
cumprod doesn't work with data frames (PR#2667)
Full_Name: J. Sisk Version: 1.6.1 OS: Linux (RedHat 8) Submission from: (NULL) (67.119.41.66) Suppose you make a data-frame like so: xxx <- data.frame(a=10,b=20,c=30,d=40) Then cumprod(xxx[1,]) returns > cumprod(xxx[1,]) a b c d 1 10 20 30 40 The documentation for cumprod says that it should work on "numerical objects", and this is a data-frame, but it
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")), +
2004 Aug 06
2
[lists] Speex & Java ...
On Thu, 2003-04-03 at 12:59, Kaveh Goudarzi wrote: > Hello People, > > Are there any ongoing efforts to port speex enc/dec > to java? I know there are a couple of things lying about in > jcraft and other sites but they all seem a little half hearted. You might like to write a JNI Wrapper. Cheers David > I've used jspxdec.zip written by james.lawrence@hellonetwork.com
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
2004 Aug 06
2
[lists] Speex & Java ...
> Thanks, I'm having a look at it. I've also had a look at the > various files making up libspeex trying to see how hard the port to > java would be ... Having only had a cursory look it looks ok except > for filters_sse.h & lpt_sse.h which have some assembly. > > Jean-Marc can you throw some light on what these do ... Also > anyone interested in chiping in some