similar to: Passing function to tapply as a string

Displaying 20 results from an estimated 2000 matches similar to: "Passing function to tapply as a string"

2008 Mar 02
5
[OT] "normal" (as in "Guassian")
Hi Folks, Apologies to anyone who'd prefer not to see this query on this list; but I'm asking because it is probably the forum where I'm most likely to get a good answer! I'm interested in the provenance of the name "normal distribution" (for what I'd really prefer to call the "Gaussian" distribution). According to Wikipedia, "The name "normal
2009 Apr 17
2
Numeric data calculated in bwplot
Hi, i was wondering if there is a way to extract statistic calculated by the function bwplot in numeric format, i.e. a list with values of borders mean etc. Going through the help i couldn't find it, and text of the function itself(bwplot) is very long. Thanks -- View this message in context: http://www.nabble.com/Numeric-data-calculated-in-bwplot-tp23096219p23096219.html Sent from the R
2009 Apr 07
4
Re ading Excel 5.0 files with RODBC?
Hi, i'm trying to read some data from excel files but it seems that neither xlsReadWrite nor sqlFetch (RODBC) doesn't like the format (Excel 5.0). When i open the file in Excel and save it in a new format Excel 97 -2003 everything works fine. Is it possible to use ODBC connection to open old format files, or i guess i will have to open and save every file in Excel in new format, which
2008 Nov 05
1
Methods dispatch and inheritance R.oo
Hi to all members, i have a question about class inheritance and methods using R.oo package: I have the following code and it doesn't work, guess i'm doing smth wrong and there is nothing in the help. library(R.oo) setConstructorS3("ClassA", function(A=15) { extend(Object(), "ClassA", .size = A ); }) setMethodS3("print", "ClassA",
2004 Nov 02
3
time dependency of Cox regression
Hi, How can I specify a Cox proportional hazards model with a covariate which i believe its strength on survival changes/diminishes with time? The value of the covariate was only recorded once at the beginning of the study for each individual (e.g. at the diagnosis of the disease), so I do not have the time course data of the covariate for any given individual. For example, I want to state at the
2009 May 26
1
passing "..." arguments to a function called by eval()
Hi everyone, I am starting learn to call C code from within R. So far, I've been trying toy problems to see if I can get them to work. One of the things I'd like to do is pass an arbitrary R function to C, evaluate the value in the C code using eval, and then return it. I also want to allow an arbitrary number of arguments to the function using "...". The code for my toy
2007 Jan 26
1
Using Windows API functions in R
Somehow autofilter doesn't allow this message to be posted, will try another time. -----Original Message----- From: Yuri Volchik <volchik2000 at list.ru> To: r-devel at r-project.org Date: Thu, 25 Jan 2007 22:27:13 +0000 Subject: Using Windows API functions in R > > Hi to all. > > In programming one application i have to "press" button to have > application
2011 Jan 21
2
ordering a vector
Hi, is there a R function that order a matrix according to some criteria based on the rows(or cols) of that matrix? For example, let's say that my matrix S is composed by n rows S_1, S_2,.., S_n and that I compute some real value g_i=g(S_i) for each row. Then I want to order this set of g_i (from smaller to bigger) and order the correspondent row to the new position. Is it possible (apart
2009 Apr 07
2
Annotation rgl plot
Hi, i was wondering if there is a way to annotate rgl plot, after searching i haven't found anything suitable. I saw function text3d but was thinking more about text on the margin, so not interactive. Thanks -- View this message in context: http://www.nabble.com/Annotation-rgl-plot-tp22930428p22930428.html Sent from the R help mailing list archive at Nabble.com.
2012 Mar 29
4
Handling functions as objects
I learnt that functions can be handled as objects, the same way the variables are. So, the following is perfectly valid: > f = function(a, b) { + print(a) + print(b) + } > > f1 = function(foo) { + foo(1,2) + } > > f1(f) [1] 1 [1] 2 > I also know that operators are functions, so, I can call: > '+'(1,2) [1] 3 > However, when I want to pass the
2001 Mar 30
1
Date format
Hi, I try to convert a string into date format. Please see the following two examples. When the time is midnight (i.e. 00:00:00), R can't convert it correctly and get a value of "NA". How to make it work and get the value of "2001-03-23 00:00:00"? Thanks!! =Example 1===================================== > S <- 20010323120000 > sTime <- strptime(paste(S),
2010 Oct 06
4
problem with abline
Hi All, I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7. Here is my code, including the SAS transport file import: require (foreign) require (chron) require (Hmisc) require (lattice) clin <- sasxport.get("y:\\temp\\subset.xpt") attach(clin)
2012 Sep 17
2
Constraint Optimization with constrOptim
Hi, I am having trouble using constrOptim. My target is to do a portfolio optimization and there some constraints have to be fulfilled. 1) The weight of each share of the portfolio has to be greater than 0 2) The sum of these weights has to be 1 I am able to fulfill either the first or the second constraint but not both. One simple way would be to fulfill the first constraint by using optim as
2006 Jul 19
2
Stirling numbers
Hi anyone coded up Stirling numbers in R? [I need unsigned Stirling numbers of the first kind] cheers Robin -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743
2007 Dec 08
1
FW: R memory management
Hi, I'm using R to collect data for a number of exchanges through a socket connection and constantly running into memory problems even though task I believe is not that memory consuming. I guess there is a miscommunication between R and WinXP about freeing up memory. So this is the code: for (x in 1:length(exchanges.to.get)) { tickers<-sqlQuery(channel,paste("SELECT Symbol
2007 Apr 18
2
[Patch]: Drive/Partition and extensible filesystem support for syslinux
Here is the patch for making syslinux enable opening partitions with fat filesystems (well, the architecture is in place to make it open other filesystems too). Usage is like this: #include <syslinux/io.h> #include <syslinux/partitions.h> #include <fs/fat/libfat.h> syslinux_devdesc dfd; struct libfat_filesystem* fs; diskinfo disk_info; char mbr[512]; static part_entry
2014 Dec 09
2
[PATCH] check for default subvolid and act accordingly on install
This fixes the issue I had come across with the default subvolume not being set/used on btrfs when isntalling via `extlinux --install /boot/syslinux`. Signed-off-by: Jordan Beaver <jordan at beaveris.me> --- extlinux/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extlinux/main.c b/extlinux/main.c index 09740bd..c3d9612 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@
2003 Apr 08
6
bitpeeler
No offense, Segher, but the output quality of this thing is awful. =) I'll disregard the fact that, at least with *my* compiler, the source tarball I downloaded reduces every packet to zero bytes, which isn't terribly interesting. I decided to set the byte reduction to something constant: I started by dividing each packet's size by 2 just to see what would happen. The resulting ogg
2010 May 15
1
barplot: invalid 'xlim' value
Forum, I am attempting to plot weekly horizontal histograms, something very similar to: http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=109 The part of the code used to create this graphic that interest me: # Draw the histograms for (i in 1:length(ages)){ par(new = TRUE) xmin <- -ages[i] + xlim[1] xmax <- xlim[2] - ages[i] ser <- freqs[, i+1] ser <-
2011 Mar 31
3
Create Variable names dynamically
Hi, I want to create variable names from within my code, but can't find any documentation for this. An example is probably the best way to illustrate. I am reading data in from a file, doing a bunch of stuff, and want to generate variables with my output. (I could make a "list of lists" and name all the elements, but I really want separate variables.) ################# #This is