Hi.
I have a procedure that reads a directory, loops through a set of particular
.RData files, loading each one, and feeding its object(s) into a function, as
follows:
cvListFiles<-list.files(fnDir);
for(i in grep(paste("^",pfnStub,".*\\.RData$",sep=""),cvListFiles)){
load(paste(fnDir,cvList
t; > myObj
> <- load(file.path(fnDir, cvListFiles[i]))> myFunction(get(myObj))>
> rm(list=myObj)> > might be closer to what you want.> > moreover, if
> length(myObj) > 1, you might want sth like:> > lapply(myObj, function(x)
> myFunction(get(x)))>
Hi.
I'm looking for an R equivalent to something like function pointers in C/C++.
I have a search procedure that evaluates the fitness of each point it reaches
as it moves along, and decides where to move next based on its fitness
evaluation. I want to be able to pass different fitness func
Occasionally when I click on a posting in the archives, I don't see the actual
message, but instead, something like the following:
An embedded and charset-unspecified text was scrubbed...
Name: not available
Url:
https://stat.ethz.ch/pipermail/r-help/attachments/200712XX/aXXX/attachment.pl
An embedded and charset-unspecified text
was scrubbed...> > On 20/12/2007 3:43 PM, Talbot Katz wrote:> > Occasionally
when I click on a posting in the archives, I don't see the actual message, but
instead, something like the following:> > > > An embedded and
charset-u
Duncan, thank you for the suggestion. This should be a plain text message,
perhaps it will post correctly to the R-help Archives.
-- TMK --
212-460-5430home
917-656-5351cell
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
Hi.
Maybe this is a stupid question. If so, I apologize, but here goes. Suppose I
have a function f1(x,...) that calls a function f2(y1,y2,...,yn) in the
following way: if x satisfies a certain condition, then I want to call
f2(x,y2,...,yn); otherwise I want to use the default value of y1,
;- function(x = u+v+w, u) { v <- u+1; x }
>
> in which case you would get an object of class
> "name" in the first case or "call" in the second.
>
>
> On Dec 26, 2007 4:42 PM, Talbot Katz wrote:
>>
>> Hi.
>>
>> Maybe this is a stupid
Hi.
I have a matrix stored in a large, tab-delimited flat file. The first row
contains column names. Because the matrix is symmetric, the file has lower
triangular format, so the second row contains one number, the third row two
numbers, etc. In general, row k+1 contains k numbers; the mat
Hi.
Suppose I have a vector that I partition into disjoint, contiguous subvectors.
For example, let v = c(1,4,2,6,7,5), partition it into three subvectors, v1 =
v[1:3], v2 = v[4], v3 = v[5:6]. I want to find the maximum element of each
subvector. In this example, max(v1) is 4, max(v2) is 6
m
> Date: Mon, 7 Jan 2008 10:44:20 -0600
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: [EMAIL PROTECTED]
> Subject: Re: [R] Seeking a more efficient way to find partition maxima
>
> Talbot Katz wrote:
>> Hi.
>>
>> Suppose I have a vector that I partiti
Hi Joh.
To echo Bert, more detail would be helpful. But here is a stab at something.
Given two numeric vectors, a and b, for each entry of a this finds the index in
b of the closest match. It's not efficient at all.
> bestmati <- function( a, b ) { return( sapply( a, function( x ) { which.m
myseq + M * cumsum(replace(0 * myseq, part, 1))
>
> # calcuate on transformed version
> tmp <- partiCmax(myseq2, part)
>
> # untransform
> tmp - M * seq_along(tmp) # c(4, 6, 7)
>
> Also you might check how it compares to the simpler
>
> tapply(myseq, cumsum(replace(
Hi.
Here are three successive examples of simple quadratic programming problems
with the same structure. Each problem has 2*N variables, and should have a
solution of the form (1/N,0,1/N,0,...,1/N,0). In these cases, N=4,5,6. As
you will see, the N=4 and 6 cases give the expected solution, b
Hi.
I'm sorry to revisit a problem that's been much discussed, but I haven't yet
been able to overcome it.
I am running R 2.5.1 on Windows XP Professional 5.1 (Service Pack 2), and I
believe I have MySQL 5.0.45 installed (I downloaded and installed
mysql-essential-5.0.45-win32.msi from
http:/
Hi.
A colleague of mine figured out how to get the RMySQL 0.6 package to load
properly in our environment with MySQL 5.0.45. Every time I tried to load
the RMySQL library in R 2.5.1 I was getting an error message:
LoadLibrary failure: Invalid access to memory location.
We did the following:
Hi.
There was an interesting thread about a year ago, called 'Command
equivalent of rgui "File, Save to File"?'
(http://tolstoy.newcastle.edu.au/R/e2/help/06/09/0553.html) started by
Michael Prager, and contributed to by Duncan Murdoch (I didn't notice
anything beyond the four entries they po
Thank you for bringing your thread to my attention. The discussion therein
pretty much encapsulated what I was trying to find out.
-- TMK --
212-460-5430home
917-656-5351cell
>From: "Muenchen, Robert A (Bob)" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
18 matches
Mail list logo