similar to: Recursive function for lists

Displaying 20 results from an estimated 4000 matches similar to: "Recursive function for lists"

2002 Jun 13
2
Summary: recursion over list
Dear all, Some days ago, I asked to the list a way to recursively handle lists objects, so that on can apply a function only on terminal nodes. Thank you for all the answers. You will find here a little summary of answers with comments: - lapply allows the user to apply a function on all the items of a list, supposing this is a list with a unique depth (like:
2002 Jun 20
1
Argument visible of addTaskCallback
Hello, I have a question about addTaskCallback It is said that the argument visible allows to know wether the result of the top-level evaluation was printed or not. Nevertheless, in the following example, I encountered a problem, as it seems not all printed objects are visible... Could someone tell me where is the tip? TIA
2000 Jan 07
0
R parser
Hello, I am actually developping a libary under S+/NT in which I do modify the .Program. Is there any equivalent in R? (the .Program is the command line parser, ie the function which is called when you press enter and pass the commmand line to the internal program) TIA Eric ?-----------------------?--------------------------------------------------? | Eric Lecoutre | DEA de
2005 Jun 14
0
c(recursive=TRUE)
Hi R users, I am currently using c(...,recursive=TRUE) to handle list-structured objects. This allows to represent something like: > l1 = list(level1=1,level2=list(sub1=1,sub2=2)) as: > (l1names = names(c(l1,recursive=TRUE))) [1] "level1" "level2.sub1" "level2.sub2" Then, one can use: > (l1names = sapply(l1names,FUN=function(element)
2004 Apr 21
0
R2HTML update
Hi to all R users, I have just uploaded in CRAN R2HTML 1.3, latest update of the R2HTML package, so that it should soon be available for your favorite platform. CHANGELOG: - Fixed some user-contributed bugs. - More CSS styles are defined, so that it's possible to change the whole look-and-feel of outputs / Add some CSS sample files. - Added HTMLstem to produce a stem-and-leaf plot (as
2004 Apr 21
0
R2HTML update
Hi to all R users, I have just uploaded in CRAN R2HTML 1.3, latest update of the R2HTML package, so that it should soon be available for your favorite platform. CHANGELOG: - Fixed some user-contributed bugs. - More CSS styles are defined, so that it's possible to change the whole look-and-feel of outputs / Add some CSS sample files. - Added HTMLstem to produce a stem-and-leaf plot (as
2004 Jun 04
1
[Wish]: Add "..." argument to library function
Hello, I would find it very usefull to have the ability to load packages with options. Consider for example the SciViews package Philippe and me are working on. When loading on Windows, it automatically loads the associated GUI executable. It should be convenient to have an option not to load the exe but still have an access to the R functions of the package. For that, I think a simple change
2005 Jan 12
1
[survey] R for Reporting - the R Output MAnager (ROMA) project
Hi R UseRs, I am interested in providing Reporting abilities to R and have initiated a project called R Output MAnager (ROMA). My starting point was my R2HTML package which provides (rough) HTML exportations. I began with trying to mimic it for LaTeX but fastly did realize that it was a bad idea. Thus, I started again from scratch a new package and did spend a lot of time reading about this
2004 Nov 09
2
do.call invoking a function with multiple arguments
Hi users, I am not sure to understand the help page about do.call. -- do.call(what, args) args: a _list_ of arguments to the function call. The 'names' attribute of 'args' gives the argument names. -- If we take the following sample data: > (tab=as.data.frame(table(factor(1:10)))) Var1 Freq 1 1 1 2 2 1 3 3 1 4 4 1 5 5
2004 Nov 23
0
Create a vector of combinations based on a table column n ames
Here's another way: > dat <- read.table("clipboard", header=TRUE)[,-(1:3)] > dat A B C D E F G H 1 1 1 0 0 0 0 0 0 2 1 0 1 0 0 0 0 0 3 1 0 0 0 1 0 0 1 4 1 0 0 0 0 1 1 0 5 0 1 1 1 0 0 0 0 6 0 0 1 0 1 0 1 1 7 0 0 0 1 1 1 0 1 8 1 0 1 1 1 0 0 1 9 1 0 1 1 0 1 1 0 > apply(dat > 0, 1, function(idx) paste(names(dat)[idx], collapse=" ")) 1 2
2004 Oct 22
1
cor, cov, method "pairwise.complete.obs"
Hi UseRs, I don't want to die beeing idiot... I dont understand the different results between: cor() and cov2cov(cov()). See this little example: > x=matrix(c(0.5,0.2,0.3,0.1,0.4,NA,0.7,0.2,0.6,0.1,0.4,0.9),ncol=3) > cov2cor(cov(x,use="pairwise.complete.obs")) [,1] [,2] [,3] [1,] 1.0000000 0.4653400 -0.1159542 [2,] 0.4653400 1.0000000
2004 Oct 19
0
R2HTML version 1.4-3
Hi useRs, I have uploaded on CRAN R2HTML version 1.4-3, which should be available soon for your favorite platform. For R 2.0.0, I had to rewrite some parts of the code so that it works. I did that quickly (maybe too), letting some bugs. Now, this is mere the good R 2.0 version, with some new functionalities: - HTML.matrix and HTML.data.frame now can use several new output options as they
2004 Oct 19
0
R2HTML version 1.4-3
Hi useRs, I have uploaded on CRAN R2HTML version 1.4-3, which should be available soon for your favorite platform. For R 2.0.0, I had to rewrite some parts of the code so that it works. I did that quickly (maybe too), letting some bugs. Now, this is mere the good R 2.0 version, with some new functionalities: - HTML.matrix and HTML.data.frame now can use several new output options as they
2004 Nov 23
0
merge.list proposal
Hi R-devel, Today I was needing a way to "merge" two different lists (see the example for my definition of merge). I didn't find anything relevant using different search methods. So, here is my proposal to add a list method for "merge". Best wishes, Eric PS: AFAIK, there still is no place for code snipplets. I am not sure this mail doesn't suite R-devel. If not,
2004 May 26
0
Once again in search of memory
Hello any R user, Working on R 1.8.1 or R 1.9 on Windows, 256 Mb RAM. I am trying to debug/correct/speedup the execution of one of our student's program. Basically, we perform simulations. R is launched with high memory-limits. One execution of the program requires nearly 200 Mbs and is OK the first time. Then, launching it again does strange things: seen from Windows manager, the RAM
2004 Jun 14
1
Copyright issues question
Hi to the Devel list, I am at present developping a little Excel add-in that would consist into a translation of John Fox RCommander package. The idea is to have R code that recreates within Excel the menus and some VBA part that handles data input and outputs (those beeing redirected to HTML and imported within Excel in a user-transparent way). Actualy, a first beyta version of this add-in
2013 Mar 12
1
Constrain slope in segmented package
Hello, I'm currently using the segmented package of M.R. Muggeo to fit a two-slope segmented regression. I would like to constrain a null-left-slope, but I cannot make it. I followed the explanations of the package (http://dssm.unipa.it/vmuggeo/segmentedRnews.pdf) to write the following code : fit.glm <- glm(y~x) fit.seg <- segmented(fit.glm, seg.Z=~x,psi=0.3) fit.glm
2005 Jun 06
0
ROMA project (R Output MAnager) / Progress report / Call for contributors
Hello useRs, This email is about the ROMA project, the implementation in pure S of a reporting system for R. Several month ago, I did then send on R-help a survey on that (mainly: what features did you expect for a reporting system). During the following months, I did try different approaches for the core functionalities, ending now with a set of generic functions of which I am satisfied. More
2004 Sep 22
1
S4 methods and polymorophism
Hello R Power Users, There is a rather large introduction you may skip to go directly to my question about S4 classes. I am working on some toy code to help me get in through S4 classes. Doing this homework, I have some questions about S4 classes. I have carefully read available help and some additional material such as Robert Gentleman's slides and special attention to "Programming
2005 Jan 14
1
S3/S4 classes performance comparison
Hi R-devel, If you did read my survey on Rhelp about reporting, you may have seen that I am implementing a way to handle outputs for R (mainly target output destinations: xHTML and TeX). In fact: I does have something that works for basic objects, entirely done with S4 classes, with the results visible at: http://www.stat.ucl.ac.be/ROMA/sample.htm http://www.stat.ucl.ac.be/ROMA/sample.pdf To