[R] left.solve
Martin Maechler
maechler at stat.math.ethz.ch
Thu Oct 21 08:59:53 CEST 1999
>>>>> "SRL" == Stephen R Laniel <laniel at stat.cmu.edu> writes:
SRL> I have sort of an emergency question for the list. One of my
SRL> professors for an S-Plus intensive class distributed a function to
SRL> produce partial regression plots. I need to run it under R,
SRL> because I'm doing the homework on my home computer with a modem;
SRL> hence I don't have the speed required to emulate X-Windows and run
SRL> S Plus off one of the campus servers. Bottom line: I'm using R.
SRL> So I tried to run the professor's partreg.q file (attached to this
SRL> message), and received this message:
SRL> Error: couldn't find function "left.solve"
SRL> The offending code is in line 62:
SRL> Q_left.solve(R, cbind(rep(1,length(x)),x))
SRL> Second bottom line (if such a thing is possible): how do I make
SRL> this code work under R? Is the cause hopeless?
Not at all :
Splus help on left.solve says
>> USAGE:
>> left.solve(r, x)
>>
>> This is support for the functions lm.hat() and
>> lm.influence(). It is not intended to be called directly
>> by users.
I.e. your professor shouldn't have used it (;-)
Then in S-plus (3.4)
> dump("left.solve","")
"left.solve"<-
function(r, x)
{
# this should really be done using DTRSL in Linpack
x[] <- x %*% solve(r)
x
}
{you could have done this over the modem line (without X11..)}
If you add the above function definition to your *.q file (or a better place)
all should work.
And yes, I don't think we'd want this function in R...
Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO D10 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list