Re: [R] A question about stepwise procedures: step function

2006-06-16 Thread Frede Aakmann Tøgersen
Well Jia, you use 'all' as a name for your dataframe, but this is also a function, see ?all. If I try it with mydata - data.frame(z1,z2,z3) all goes well. Med venlig hilsen Frede Aakmann Tøgersen -Oprindelig meddelelse- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] På

[R] The qurey about kolmogorov-smirnov test adding the trendline to graph

2006-06-16 Thread priti desai
I am hereby forwarding the data method use to calculate the Kolmogorov-Smirnov goodness of fit test made manually by me in R launguage which deffers with the actual inbuilt formula as shown below. Further I have plot the graph in R. In that graph how to add trendline (i.e. straight line passing

Re: [R] Install R 2.3.1 on SUSE Linux

2006-06-16 Thread Detlef Steuer
Hi, you have to add an online repository for 10.0 to your installation sources. This is covered in the file called http://cran.r-project.org/bin/linux/suse/ReadMe.html which was added to be read. ;-) Detlef On Thu, 15 Jun 2006 10:05:19 -0500 [EMAIL PROTECTED] wrote: Hello: I am new to

[R] Assignemt problem ,,,,,,,,,,,,,,,

2006-06-16 Thread anil kumar rohilla
  Hello list, i have a very simple question about matrix assignment. i did like this. res-1:30 dim(res)-c(5,6) ind-1:6 now i want to assign the value of this variable ind to first coloumn in matrix res. like res[,1]-ind but this code is giving error , Actualy i have a for loop and

[R] inplace assignment

2006-06-16 Thread David Hugh-Jones
I get tired of writing, e.g. data.frame[some.condition another.condition, big.list.of.columns] - paste(data.frame[some.condition another.condition, big.list.of.columns], foobar) I would a function like: inplace(paste(data.frame[some.condition another.condition, big.list.of.columns],

Re: [R] Assignemt problem ,,,,,,,,,,,,,,,

2006-06-16 Thread Stefano Calza
Hi, your matix has 5 rows and 6 columns. So, either you do ind - 1:5 res[,1] - ind or dim(res) - c(6,5) HIH, Stefano On Fri, Jun 16, 2006 at 09:13:54AM -, anil kumar rohilla wrote: anil ? anilHello list, anil i have a very simple question about matrix assignment. anil anili did

Re: [R] Yahoo data download problem

2006-06-16 Thread Petr Pikal
Hi On 16 Jun 2006 at 8:52, SUMANTA BASAK wrote: Date sent: Fri, 16 Jun 2006 08:52:22 +0100 (BST) From: SUMANTA BASAK [EMAIL PROTECTED] To: R HELP r-help@stat.math.ethz.ch, [EMAIL PROTECTED] Subject:[R] Yahoo data

Re: [R] number of iteration s exceeded maximum of 50

2006-06-16 Thread Uwe Ligges
Leaf Sun wrote: Hi all, I found r-site-research not work for me these days. When I was doing nls( ) , there was an error number of iterations exceeded maximum of 50. I set number in nls.control which is supposed to control the number of iterations but it didn't work well. Could anybody

Re: [R] R with tcl/tk 8.5

2006-06-16 Thread Prof Brian Ripley
When Tcl/Tk 8.5 exists please ask again. (It is currently in *alpha*: do you expect to use alpha software with a stable package?) On Thu, 15 Jun 2006, JeeBee wrote: Hi List, Is it possible to tell R to use tcl/tk 8.5? My R package seems to depend on libtcl8.4.so. It may work if you compile

Re: [R] inplace assignment

2006-06-16 Thread Adaikalavan Ramasamy
I do not fully understand your question but how about : inplace - function( df, cond1, cond2, cols, suffix ){ w - which( cond1 cond2 ) df - df[ w, cols ] paste(df, suffix) return(df) } BTW, did you mean colnames(df) - paste(colnames(df), suffix) instead of paste(df, suffix) ?

Re: [R] inplace assignment

2006-06-16 Thread David Hugh-Jones
It's more a general point about having to write things out twice when you do assignments. I could also have written: data.frame[some.condition another.condition, big.list.of.columns] - data.frame[some.condition another.condition, big.list.of.columns] * 2 + 55 or anything else. Equally, there

Re: [R] Yahoo data download problem

2006-06-16 Thread SUMANTA BASAK
Hi Petr, Thanks for the solution. But my problem is still there. I have 500 company names in a single column in an excel sheet of SP 500 index. I need to call all those compnies in a 'for' loop and write that whole dataset into a text file. I've developed the following one, but the problem is

Re: [R] Name of a column

2006-06-16 Thread David Hugh-Jones
1. You don't need to say truc==T. truc is already a logical vector. 2. colnames are just another vector, so do colnames(truc)[truc] Dave On 15/06/06, David Hajage [EMAIL PROTECTED] wrote: Hello, My problem is quite simply, but I didn't find any solution... I have a vector : truc

[R] A doubt concerning a closed visualization of a ternaryplot

2006-06-16 Thread Martínez Ovando Juan Carlos
Hi all Does someone know how can I alter the range of some variables in a 'ternaryplot' of the 'vcd' package, with the aim of make a closed visualization of some of its regions? Thank you in advance Sincerely, Juan Carlos 2006, Año del Bicentenario del natalicio del Benemérito de

Re: [R] matrix selection return types

2006-06-16 Thread vincent
jim holtman a écrit : z1 - m[m[,1] == 2,, drop=FALSE] What is the problem you are trying to solve? It was not really a big problem. Just that without the drop argument, The changing returned type complicated the next computations. drop=TRUE makes it homogeneous, which is what I needed.

Re: [R] Yahoo data download problem

2006-06-16 Thread Charles Annis, P.E.
Why create an enormous matrix? Why not read each company's info and immediately write it to the file using write.csv( ... append = TRUE ...)? ^ Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265

[R] doubt concerning a closed visualization of a ternaryplot

2006-06-16 Thread Martínez Ovando Juan Carlos
Hi all Does someone know how can I alter the range of some variables in a 'ternaryplot' of the 'vcd' package, with the aim of make a closed visualization of some of its regions? Thank you in advance Sincerely, Juan Carlos 2006, Año del Bicentenario del natalicio del

Re: [R] Install R 2.3.1 on SUSE Linux

2006-06-16 Thread dennis.mcleod
Detlef: Thank You ! Learning Linux is a challenge, sometimes frustrating; but I believe it is well worth it. Thanks again for your help Dennis -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Detlef Steuer Sent: Friday, June 16, 2006 2:33 AM To:

[R] how to setup parallel environment?

2006-06-16 Thread Mike Wolfgang
Dear list, My institution has a Beowulf Linux cluster with 128 nodes. I want to set up a parallel environment for R so that I can run some easily parallelizable jobs. I searched around and only found some packages (like snow, rpvm) with tutorials on how to run R functions in a already-setup

[R] R in ConTeXt

2006-06-16 Thread Johan Sandblom
In case there are users of the TeX macro package ConTeXt on this list, they may be interested to know that it is now possible to include R code in a ConTeXt document and have the code evaluated while compiling. The inverse of Sweave, as it were. The advantage is that there is then only one file to

[R] Garch warning

2006-06-16 Thread Arun Kumar Saha
Dear all R-users, Previously I posted the same query in R-Help. But I haven't got the solution. So I am posting the same query again. It is my strong hope that I will get my solution this time. I wanted to fit a Garch(1,1) model to the following data set by: garch1 = garch(dat) But I got a

Re: [R] matrix log

2006-06-16 Thread Spencer Graves
I'm not aware of any R implementation of a logarithm of a matrix. I've seen discussions on this list of the difficulties involved in computing functions of matrices, but I know of nothing. (The 'nlme' package has 'pdLogChol', which may be related, but I think it's different.)

[R] diagonal matrix: rows rearrangement

2006-06-16 Thread Federico Calboli
Hi All, I have a non-square matrix of 0s/1s. The rows are individuals, and the colums factors. The code is 1 if a factor is present, 0 if not. I would like to rearrange the order of the rows to find if there are any diagonal blocks. Is there a fucntion that would do that already in R? Cheers,

[R] interfacing ocaml with R

2006-06-16 Thread Viktor Tron
Dear R-ers, Does anyone know if one can interface R from other languages, notably OCaml I'd be interested in? Omegahat gives python and perl for which there are bidirectional interfaces but I wonder if there are general robust ways for other languages. I can open R as a pipe process and can

[R] a method to trim composite objects?

2006-06-16 Thread Francois . Bastardie
dear R users, please, consider the following code you may run: setClass(my.class1, representation( my.list= list, my.array1 = array), prototype=prototype( my.list=list(), my.array1 =array(0,c(3,3,3))

Re: [R] number of iteration s exceeded maximum of 50

2006-06-16 Thread Leaf Sun
Sorry, I thought it was a straightforward question inside which I was stuck . I used nls( ) to estimate a and b in this function. nls(y~ a*x^b,start=list(a=a1,b=b1) seems the start list I gave was not able to reach convergence and it gave notes: number of iteration s exceeded maximum of 50.

Re: [R] number of iteration s exceeded maximum of 50

2006-06-16 Thread Berton Gunter
My goodness! This is **NOT** a reproducible example. You need to give us the exact data you fitted to reproduce your results/diagnose your problem. -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning

[R] modeling logit(y/n) using lrm

2006-06-16 Thread Hamilton, Cody
I have a dataset at a hospital level (as opposed to the patient level) that contains number of patients experiencing events (call this number y), and the number of patients eligible for such events (call this number n). I am trying to model logit(y/n) = XBeta. In SAS this can be done in PROC

Re: [R] modeling logit(y/n) using lrm

2006-06-16 Thread Rolf Turner
Cody Hamilton, Ph.D, wrote: I have a dataset at a hospital level (as opposed to the patient level) that contains number of patients experiencing events (call this number y), and the number of patients eligible for such events (call this number n). I am trying to model logit(y/n) = XBeta.

Re: [R] modeling logit(y/n) using lrm

2006-06-16 Thread Kevin E. Thorpe
Hamilton, Cody wrote: I have a dataset at a hospital level (as opposed to the patient level) that contains number of patients experiencing events (call this number y), and the number of patients eligible for such events (call this number n). I am trying to model logit(y/n) = XBeta. In SAS

[R] modeling logit(y/n) using lrm

2006-06-16 Thread Hamilton, Cody
Thank you for the suggestions! I am interested in using lrm because I am not sure that glm will interact with other functions from Hmisc (e.g. aregImpute, fit.mult.impute, etc). Cody Hamilton, Ph.D Institute for Health Care Research and Improvement Baylor Health Care System (214) 265-3618

Re: [R] modeling logit(y/n) using lrm

2006-06-16 Thread bogdan romocea
Not sure about your data set, but if you have some kind of (weighted/stratified) sample of hospitals you need to pay special attention. Survey data violates the assumptions of the classical linear models (infinite population, identically distributed errors etc) and needs to be analyzed

[R] problem with legend on other graphics devices

2006-06-16 Thread Gavin Simpson
Hi, I have a bit of a problem with a legend in png, eps and pdf plots produced from a custom plotting function. I was writing a little function to produce some stock plots for a routine analysis conducted in our lab. I have a wrapper function figures() (see below) that produces eps, png and pdf

[R] modeling logit(y/n) using lrm

2006-06-16 Thread Hamilton, Cody
After a little digging, it turns out that fit.mult.impute will allow fitter = glm, so previous suggestions regarding modeling cbind(y,n) as an outcome will work fine. Thanks! Cody Hamilton, Ph.D Institute for Health Care Research and Improvement Baylor Health Care System (214) 265-3618

[R] any function for monotone nonparametric regression?

2006-06-16 Thread Cunningham Kerry
I am wondering if there is any package in R that can fit a nonparametric regression model with monotone constraints on the fitted results. - [[alternative HTML version deleted]] __

Re: [R] any function for monotone nonparametric regression?

2006-06-16 Thread Berton Gunter
Why wonder? Why not use R's search facilities to find out for yourself? RSiteSearch('monotonic regression') -- Bert Gunter Genentech Non-Clinical Statistics South San Francisco, CA The business of the statistician is to catalyze the scientific learning process. - George E. P. Box

[R] Vector Manipulation

2006-06-16 Thread Davis, Jacob B.
I have a vector that has 1,974 elements and each element is one of the following (B, F, N, Y). How do I recreate that vector accept in the place of N put 0 and in the place of B, F or Y put a 1? Thanks, Jacob [[alternative HTML version deleted]]

Re: [R] Vector Manipulation

2006-06-16 Thread Doran, Harold
I think you want ifelse(x=='N',0,1) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Davis, Jacob B. Sent: Friday, June 16, 2006 4:46 PM To: r-help@stat.math.ethz.ch Subject: [R] Vector Manipulation I have a vector that has 1,974 elements

Re: [R] Vector Manipulation

2006-06-16 Thread Dimitrios Rizopoulos
try the following: x - c(B, F, N, Y) y - numeric(length(x)) y[x != N] - 1 y I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven Address: Kapucijnenvoer 35, Leuven, Belgium Tel:

[R] Object polygon data frame

2006-06-16 Thread fernando espindola
Hi User R, I have a little problem, I am try to plot a polygon data frame object (of class sp) with two varibles (z1,z2), first plot is the polygon with the first variable (z1), second is plot the same polygon with the second variable (z2) in other display. Anybody can get me an advance

[R] scatterplot but a little tricky

2006-06-16 Thread markleeds
i have two vectors of numbers x and y and of course i can do the standard scatterplot plot(x,y) and it looks fine. But, I was hoping there was a way to do the scatterplot so that each point plotted is a number where the number represents the index in the dataset. so, if it was x[3] and y[3], then

Re: [R] scatterplot but a little tricky

2006-06-16 Thread Sarah Goslee
On 6/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have two vectors of numbers x and y and of course i can do the standard scatterplot plot(x,y) and it looks fine. But, I was hoping there was a way to do the scatterplot so that each point plotted is a number where the number represents

Re: [R] scatterplot but a little tricky

2006-06-16 Thread Jeff Hammerbacher
z - as.character(1:length(x)) plot(x, y, pch = z) Regards, Jeff On 6/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have two vectors of numbers x and y and of course i can do the standard scatterplot plot(x,y) and it looks fine. But, I was hoping there was a way to do the scatterplot

[R] doubt concerning a closed visualization of a ternaryplot

2006-06-16 Thread Juan Carlos Martínez Ovando
Hi all Does someone know how can I alter the range of some variables in a 'ternaryplot' of the 'vcd' package, with the aim of make a closed visualization of some of its regions? Thank you in advance Sincerely, Juan Carlos [[alternative HTML version deleted]]

[R] Effect size in mixed models

2006-06-16 Thread Bruno L. Giordano
Hello, Is there a way to compare the relative relevance of fixed and random effects in mixed models? I have in mind measures of effect size in ANOVAs, and would like to obtain similar information with mixed models. Are there information criteria that allow to compare the relevance of each of

[R] prob in sample function

2006-06-16 Thread Antonio Olinto
Hi, I have a data set with values (L) varying from 1 to 700, with repeated numbers, and I want to sample them according to the probabilities given by a logistic curve P=1/(1+e(-r*(L-Lc))) where r gives S the inclination and Lc the rotation point. P ranges from 0 to 1. As I could see I cannot use

Re: [R] Estimate region of highest probabilty density

2006-06-16 Thread Spencer Graves
I have more sympathy than ideas for you, but I'll attempt to offer the latter as I haven't seen other replies to your post. First, if you've got a grid for contour, you can do various kinds of numerical integration. If I just wanted a rough answer and I didn't have to sell