Re: [R] conditional assignments and calculations

2004-10-03 Thread Gabor Grothendieck
Michael Lachmann lachmann at eva.mpg.de writes: : : Hello! : : I am using the TeXmacs interface to R. (Though I encountered a similar : problem when using Sweave) : In doing calculations I often ecounter this scenario: I'll have some : calculations in my file: : -- : A=read.lots.of.data() :

[R] creating new varFunc classes in nlme .. error: Don't know how to get coefficients for .. object

2004-10-03 Thread J
Hello. I am trying my hand at modifying the varFunc class varExp, but I must be missing a step. All I want to do right now is make a working copy of varExp, call it varExp2, and then later change it. coef.varExp2, coef-.varExp2, and Initialize.varExp2 all seem to work properly after I construct

Re: [R] Reading multiple files into R

2004-10-03 Thread Roger Bivand
On Sun, 3 Oct 2004, Vikas Rawal wrote: Thanks Kevin and Roger. This gave me the clue and was a great help. I have been trying it out. There is some problem in the code that still needs to be figured out. For the first 9 files, paste(wb-0, i, vc.dbf, sep=) works fine. But as you rightly

[R] Re: creating new varFunc classes in nlme .. error: Don't know how to get coefficients for .. object

2004-10-03 Thread J
Ah!! After way too many hours of work Ive answered my own question. To get varExp2, a copy of varExp, to work as a new varFunc, one needs to use this sort of syntax: update.varExp2 - function (object, data, ...) { print (enter update) val - NextMethod() if (length(val) == 0) {

[R] Excluding data in R

2004-10-03 Thread Laura Collins
I was hoping someone could help me! How do you exclude outliers from a set of data? Thanks, Laura [[alternative HTML version deleted]] __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Excluding data in R

2004-10-03 Thread Kevin Wang
Hi, On Sun, 3 Oct 2004, Laura Collins wrote: How do you exclude outliers from a set of data? Your question is too vague. I'm assuming you have a data frame and already know exactly which observations are the outlier(s). If your data frame is called foo.df, and say observation 5 is an

[R] If loops

2004-10-03 Thread Laura Collins
Hi, I'm a complete beginner to all this so I was hoping someone could help me! What I'm trying to do is to write a function that returns the coordinates where a vector x is equal to a. So say I invent a vector x: x-c(,5,8,9,8,3). If a is a-8. I want the function to return the

Re: [R] If loops

2004-10-03 Thread Uwe Ligges
Laura Collins wrote: Hi, I'm a complete beginner to all this so I was hoping someone could help me! What I'm trying to do is to write a function that returns the coordinates where a vector x is equal to a. So say I invent a vector x: x-c(,5,8,9,8,3). If a is a-8. I want the function to

RE: [R] If loops

2004-10-03 Thread Liaw, Andy
From: Laura Collins Hi, I'm a complete beginner to all this so I was hoping someone could help me! What I'm trying to do is to write a function that returns the coordinates where a vector x is equal to a. So say I invent a vector x: x-c(,5,8,9,8,3). If a is a-8. I want the

[R] help working with persp plot function

2004-10-03 Thread Steven K Friedman
Hi, I don't understand why this is not working. Help is appreciated. I need to plot the following as a surface, but persp returns an error. tpcp_xy[1:10,] X_COORD Y_COORD TPCP 1 465459.7 175924.1 0.85 2 466145.8 324017.3 2.30 3 467720.2 372143.1 1.56 4 470293.2 348064.8 2.87 5

Re: [R] help working with persp plot function

2004-10-03 Thread Andrew Robinson
Hi Steve, persp() is looking for x and y to be the coordinates on the axes rather than corresponding directly to the points. So, something like x - c(1:3) y - c(1:3) z - c(1:9) Take a look at the third example in help(persp) to clarify. For your data you might try the surface() function in

[R] compile R-1.9.1 with Portland fortran

2004-10-03 Thread Jin Shusong
Dear R-users, Has any one compiled R-1.9.1 successfully with Portland pgcc pgCC and pgf77? I can not configurate it with ./configure since it told me checking for Fortran name-mangling scheme... configure: error: cannot compile a simple Fortran program Can any one give me some

[R] Could anyone tell me how to extract pvalue from lm fitting?

2004-10-03 Thread Frank Duan
Dear R people, I have a naive question: after fitting lm to a data, I can't extract the pvalue corresponding to a specific covariate in a direct way. Could anyone give me a hint? Thank you very much. Frank __ [EMAIL PROTECTED] mailing list

[R] Off-Topic: LaTeX package listings

2004-10-03 Thread Kjetil Brinchmann Halvorsen
Hola! I ask here since I learnt from this list that the LaTeX package listings should be good for typesetting R code. I encountered one problem: \begin{lstlisting} X %*% V \end{lstlisting} in the output the * in %*% disappears! same with %/%, etc, the / disappears. Any ideas? Kjetil --

Re: [R] Off-Topic: LaTeX package listings

2004-10-03 Thread Marc Schwartz
On Sun, 2004-10-03 at 21:26, Kjetil Brinchmann Halvorsen wrote: Hola! I ask here since I learnt from this list that the LaTeX package listings should be good for typesetting R code. I encountered one problem: \begin{lstlisting} X %*% V \end{lstlisting} in the output the * in %*%