Re: [R] R Extensions: Hyperlinking a pdf (not generated by Sweave/not a vignette) from a .Rd file

2007-09-23 Thread Prof Brian Ripley
On Sat, 22 Sep 2007, [EMAIL PROTECTED] wrote: When constructing an R extension, how can a hyperlink from an .Rd file to a pdf (not generated by Sweave, so not a vignette) located in the inst/doc folder be constructed? With \url. I presume you mean writing a package, and installing into the

[R] return(x=x,y=y,prob=prob) hasn't been used in R now?

2007-09-23 Thread zhijie zhang
Dear friends, Now, when i use the argument return(x=x,y=y,prob=prob) , R displays the waring message: Warning message: The return value for multiple variables wasn't used in: return(x = x, y = gy, prob = prob) I used the methods of help.search(return) and ?return to get some help, but didn't

Re: [R] return(x=x,y=y,prob=prob) hasn't been used in R now?

2007-09-23 Thread Christian Ritz
Hi! Use a list structure for all the components you want to have returned by the function: return(list(x=x, y=y, prob=prob)) Christian __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] return(x=x,y=y,prob=prob) hasn't been used in R now?

2007-09-23 Thread zhijie zhang
It works well. Thanks a lot. On 9/23/07, Christian Ritz [EMAIL PROTECTED] wrote: Hi! Use a list structure for all the components you want to have returned by the function: return(list(x=x, y=y, prob=prob)) Christian -- With Kind Regards, oooO: (..):

Re: [R] return(x=x,y=y,prob=prob) hasn't been used in R now?

2007-09-23 Thread Prof Brian Ripley
On Sun, 23 Sep 2007, Peter Dalgaard wrote: zhijie zhang wrote: Dear friends, Now, when i use the argument return(x=x,y=y,prob=prob) , R displays the waring message: Warning message: The return value for multiple variables wasn't used in: return(x = x, y = gy, prob = prob) I used the

[R] saving results under specified file name

2007-09-23 Thread Nitin Jain
Hello, I would like to save the results in a specified file name. Here is a test example: aa - function(xx, newname) { yy - xx^2 rdName - file.path(paste(newname, .RData, sep = )) assign(eval(newname), yy) save(newname, file=rdName) ## FIXME } aa(3, test) load(test.RData) ls()

Re: [R] return(x=x,y=y,prob=prob) hasn't been used in R now?

2007-09-23 Thread zhijie zhang
Dear Prof. Brian Ripley, You are absolutely right. The warning message in R for my Chinese Windows system is Chinese words, so i translate it into english, which maybe not that exact in the meanings. Thanks very much. On 9/23/07, Prof Brian Ripley [EMAIL PROTECTED] wrote: On Sun, 23 Sep

Re: [R] saving results under specified file name

2007-09-23 Thread Frank E Harrell Jr
Nitin Jain wrote: Hello, I would like to save the results in a specified file name. Here is a test example: aa - function(xx, newname) { yy - xx^2 rdName - file.path(paste(newname, .RData, sep = )) assign(eval(newname), yy) save(newname, file=rdName) ## FIXME }

[R] nls fits by groups

2007-09-23 Thread Aleksi Lehtonen
Dear Colleagues, I am trying to estimate several non-linear models simultaneously. I don't want to use non-linear mixed model, but non-linear model with same form, but it should be estimated separately according to variable group (I have lots of groups that have lots of observations). I would

Re: [R] nls fits by groups

2007-09-23 Thread Katharine Mullen
It is not clear from your post what changes per-group. If only the starting values change (but the data and the model structure are the same), then you can just store the starting values you want to use for each group in a list, and then index into this list in your call to nls. e.g., modifying

Re: [R] return(x=x,y=y,prob=prob) hasn't been used in R now?

2007-09-23 Thread Zhang Honglian
I don't know what exactly you want the program to do. But if you want to let the function to return several values in the same time, you have to put them into a list. E.g. in the following program, the function will return 4 different things, x and y are vectors, prob is a matrix and

Re: [R] help with rq

2007-09-23 Thread Uwe Ligges
Vivian wrote: I used in 2004 an earlier version of R (1.6.0 ?) for quantile regressions Now I downloaded version 2.5.1-win32 and I cannot A) read my old files (Our exel working space was saved in csv) and also the series of instructions does not work, see below (B) rq function is not

Re: [R] find all objects of a particular class

2007-09-23 Thread Zhang Honglian
Hello, I would like to find all objects of a particular class. Is that possible to do so in R? I knew that in SPLUS, the function objects(class=classname) can do this. But in R, I cannot find the similar function to do so. Is there any way that I can distinguish where an object

Re: [R] A weird observation from using read.table

2007-09-23 Thread Bartjoosen
Take a look at ?scan. There is an explanation for the doubling of the string Bart Jun Ding wrote: Hi Everyone, Recently I got puzzled by the function read.table, even though I have used it for a long time. I have such a file (tmp.txt, 2 rows and 3 columns, with a space among

[R] glmpath: how to choose best lambda

2007-09-23 Thread Tirthadeep
Hi all, I am using glampath package for L1 regularized logistic regression. I have read the article L1 regularization path algorithm for GLM by park and Hastie (2006). One thing I can't understand that how to find best lambda for my prediction. I want to use that lambda for the prediction not

[R] Correlated frailty model

2007-09-23 Thread ah06981
Dear R-help, I am trying to a estimate a correlated frailty model. My dataset is made up of 4 observations. I would like to know if it is too big or I have done some mistakes in the following code. group-paste(usa$id,usa$mob) mixed.logn-coxme(Surv(yearspan)~ south+mod, data=usa,random= ~

Re: [R] saving results under specified file name

2007-09-23 Thread Nitin Jain
Thanks Professor Ripley and Professor Harrell. Yes, save(list=newname, ...) works. Best, Nitin - Original Message From: Prof Brian Ripley [EMAIL PROTECTED] To: Nitin Jain [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Sunday, September 23, 2007 11:14:37 AM Subject: Re: [R] saving

Re: [R] nls fits by groups

2007-09-23 Thread Ken Knoblauch
Aleksi Lehtonen lehtonen.aleksi at gmail.com writes: I am trying to estimate several non-linear models simultaneously. I don't want to use non-linear mixed model, but non-linear model with same form, but it should be estimated separately according to variable group (I have lots of groups that

Re: [R] saving results under specified file name

2007-09-23 Thread Frank E Harrell Jr
Nitin Jain wrote: Thanks Professor Ripley and Professor Harrell. Yes, save(list=newname, ...) works. Best, Nitin What I didn't see how to do with save( ) is to save an object with a user-specified internal name that is different from the current name of the object. Save in Hmisc goes

Re: [R] find all objects of a particular class

2007-09-23 Thread Henrique Dallazuanna
Perhaps, object - sapply(ls(), function(x)class(eval(parse(text=x object[grep(character, object)] -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40 S 49° 16' 22 O On 23/09/2007, Zhang Honglian [EMAIL PROTECTED] wrote: Hello, I would like to find all

Re: [R] saving results under specified file name

2007-09-23 Thread Duncan Murdoch
Frank E Harrell Jr wrote: Nitin Jain wrote: Thanks Professor Ripley and Professor Harrell. Yes, save(list=newname, ...) works. Best, Nitin What I didn't see how to do with save( ) is to save an object with a user-specified internal name that is different from the current name

Re: [R] Plotting numbers at a specified decimal length on a plot()

2007-09-23 Thread Marc Schwartz
On Sun, 2007-09-23 at 13:50 -0400, Matthew Dubins wrote: Hi there, I want to figure out how to plot means, with 2 decimal places, of any Y variable on a scatterplot according to any X variable (which obviously should have limited scope). I already figured out how to plot the means, but