[R] wireframe question

2003-07-16 Thread J Ireland
Hi, I'm probably being dense, but could somebody tell me how I can get tick marks on the axes of my wireframe plot to show up? This gets me a beautiful looking plot, but no ticks: wireframe(z ~ x * y, data, drape=T, colorkey=F) Thanks in advance, -James [[alternative HTML

[R] Stem and leaf display?

2003-07-16 Thread Richard A. O'Keefe
I would like to do some fairly basic stem-and-leaf displays in R. I am aware (I might even say painfully aware) of stem(base) and have tried it. That's why I'm hoping someone has a usable stem- and-leaf display for R so that I don't have to write my own. r-project.org Search R Site Search

RE: [R] wireframe question

2003-07-16 Thread Simon Blomberg
try wireframe(z ~ x * y, data, drape=T, colorkey=F, scales=list(arrows=FALSE)) see the help for scales under ?xyplot for other goodies. Cheers, Simon. Simon Blomberg, PhD Depression Anxiety Consumer Research Unit Centre for Mental Health Research Australian National University

Re: [R] Excel can do what R can't?????

2003-07-16 Thread M.Kondrin
?optim optim(par, fn, gr = NULL, method = c(Nelder-Mead, BFGS, CG, L-BFGS-B, SANN), lower = -Inf, upper = Inf, control = list(), hessian = FALSE, ...) . fn: A function to be minimized (or maximized), with first argument the vector of parameters

Re: [R] eigen vector sign reversal

2003-07-16 Thread Martin Maechler
Roger == Roger D Peng [EMAIL PROTECTED] on Tue, 15 Jul 2003 10:19:38 -0700 writes: Roger I think at version 1.7.0 R started using LAPACK for Roger its eigen/svd routines. I think using `eigen(x, Roger EISPACK = TRUE)' uses the previous version. Yes (2 x). But it the eigen

Re: [R] Stem and leaf display?

2003-07-16 Thread Richard Rowe
At 18:08 16/07/03 +1200, Richard A. O'Keefe wrote: I would like to do some fairly basic stem-and-leaf displays in R. I am aware (I might even say painfully aware) of stem(base) and have tried it. That's why I'm hoping someone has a usable stem- and-leaf display for R so that I don't have to write

[R] Weighted SUR, 2SLS regressions

2003-07-16 Thread Yonathan (Jon) Anson
Is there an option for running SUR and 2SLS regressions with weighting (I am analysing mortality in towns, hence want to weight by population size) Many thanks Jon Anson -- Yonathan (Jon) Anson Department of Social Work Ben Gurion University of the Negev 84105 Be'er Sheva, Israel. Tel: +972 8

[R] Missing or Corrupted Files

2003-07-16 Thread MOORE_ROGER
I'd appreciate any advice people can give me on the following problem :- I've recently started using R, as support for WinBugs software, on my PC which runs Windows XP. Whatever I've done has resulted in the loss of the GUI display, although other functionality appears to be okay. This occurred

RE: [R] Plotting a graph of many lines between groups of points...

2003-07-16 Thread Hotz, T.
Dear Andrew, Assuming your variables are called V1 to V4, and are vectors, I'd use something like plot(V1,V2,xlim=range(V1,V3),ylim=range(V2,V4),type=n) segments(V1,V2,V3,V4) HTH Thomas --- Thomas Hotz Research Associate in Medical Statistics University of Leicester United Kingdom

[R] CRAN package orphanizing process

2003-07-16 Thread Friedrich . Leisch
As the list of packages on CRAN becomes longer almost on a weekly basis, we need a formal mechanism to handle the case when somebody wants to resign from maintaining a package. Possible reasons for orphanizing a package: 1) The current maintainer actively wants to orphanize the package,

Re: [R] Missing or Corrupted Files

2003-07-16 Thread Uwe Ligges
[EMAIL PROTECTED] wrote: I'd appreciate any advice people can give me on the following problem :- I've recently started using R, as support for WinBugs software, on my PC which runs Windows XP. Whatever I've done has resulted in the loss of the GUI display, although other functionality appears

[R] Re: Info

2003-07-16 Thread Andrea Calandra
Sorry I'm student in biomedical engineer and i have to solve this formula for immuno-assay. I need to design a calibration curve But i don't understand How can i write this formula in R language: y = a + (c - a) /(1+ e[-b(x-m]) where x = ln(analyte dose + 1) y = the optical absorbance data a =

[R] how to handle missing values

2003-07-16 Thread Tor A Strand
This group impresses me, so far I have been helped with all my questions within 24 hours. Thanks. Therefore another one. I am used to programs (such as STATA) where observations with missing values that are included in a model are simply ignored in the analysis. So far I have not been able to

Re: [R] how to handle missing values

2003-07-16 Thread Ko-Kang Kevin Wang
There are many packages that handles missing values, aka imputations. From memory Hmisc is one of them. But you can certainly search through CRAN. On Wed, 16 Jul 2003, Tor A Strand wrote: Date: Wed, 16 Jul 2003 12:11:32 +0200 From: Tor A Strand [EMAIL PROTECTED] To: R-list [EMAIL

[R] numerical differentiation in R? (for optim SANN parscale)

2003-07-16 Thread BORGULYA Gbor
Dear R users, I am running a maximum likelihood model with optim. I chose the simulated annealing method (method=SANN). SANN is not performing bad, but I guess it would be much more effecive if I could set the `parscale' parameter. The help sais: `parscale' A vector of scaling values for the

Re: [R] Why two chisq.test p values differ when the contingency

2003-07-16 Thread Peter Dalgaard BSA
Shi, Tao [EMAIL PROTECTED] writes: Hi, Ted: I guess this problem is platform-dependent. I just tied it on a R 1.6.1 runing on Win2K, it gave me two different p values. But when I tried it on R1.7.0 on a Linux Server, I got the similar result as you did. I have filed a bug-report as Peter

RE: [R] how to handle missing values

2003-07-16 Thread Adaikalavan Ramasamy
This really depends on what you want to do. I will try to give some example below. 1. Coding the missing values But you definitely do not need to delete observations BEFORE loading them into R. By default any empty cells or NA is treated as NA, when you load the data using read.delim(). You

Re: [R] Re: Info

2003-07-16 Thread Douglas Bates
Andrea Calandra [EMAIL PROTECTED] writes: I'm student in biomedical engineer and i have to solve this formula for immuno-assay. I need to design a calibration curve But i don't understand How can i write this formula in R language: y = a + (c - a) /(1+ e[-b(x-m]) where x = ln(analyte

Re: [R] Re: Info

2003-07-16 Thread Spencer Graves
On 7/11, I replied to one of your earlier posts on this problem wiht the following: chemYield - function(a, x)(a[1]+(a[3]-a[2])/(1+exp(-a[2]*(x-a[4])) This can be used in optim but not nls. Mimicking an example in the documentation for nls (package nls), I suspect the following should work:

Re: [R] Excel can do what R can't?????

2003-07-16 Thread Spencer Graves
The phrase: f - 10*(Wt-Wtmod)^2)/Wt) + (((Hgt-Hgtmod)^2)/Hgt))2) ; f is an immediate computation, not a function. If you want a function, try something like the following: f - function(x){ Wt - x[1] Wtmod - x[2] Hgt - x[3] Hgtmod -

[R] Sorting a data frame

2003-07-16 Thread Wayne Jones
Hi there R-Helpers, Does anyone know if it is possible to sort a dataframe? I.e. Sort alphabetically column 1 ( which has some reocurring elements) then sort alphabetically column2 but keeping the order of column 1 constant; much the same way that the sort function works in Excel. Regards,

[R] turning list-elements into a vector

2003-07-16 Thread Michael Kirschbaum
Hi. Can anyone help me? I want to create a vector from specific matrix-elements( e.g.[1,1]) these matrices are elements of a list. Is there any possibility to work without a loop? (e.g. with lapply?) hope, you can help me thank you Michael [[alternative HTML version deleted]]

[R] Tobit analysis

2003-07-16 Thread Andrew Barnes
Having read previous correspondance on this topic, am I right in using a gaussian distribution for a tobit model, one article suggests a normal distribution? Also, I want to censure at the upper bound, so, using the survival5 package I use: survreg(Surv(y,yc,type=right)~x) for a censored

Re: [R] Sorting a data frame

2003-07-16 Thread Spencer Graves
?order hope this helps. spencer graves Wayne Jones wrote: Hi there R-Helpers, Does anyone know if it is possible to sort a dataframe? I.e. Sort alphabetically column 1 ( which has some reocurring elements) then sort alphabetically column2 but keeping the order of column 1 constant; much the

Re: [R] Sorting a data frame

2003-07-16 Thread Duncan Murdoch
On Wed, 16 Jul 2003 14:42:09 +0100, Wayne Jones [EMAIL PROTECTED] wrote : Hi there R-Helpers, Does anyone know if it is possible to sort a dataframe? I.e. Sort alphabetically column 1 ( which has some reocurring elements) then sort alphabetically column2 but keeping the order of column 1

[R] Re: Four-parameter logistic [was Re: Info]

2003-07-16 Thread Douglas Bates
Spencer Graves [EMAIL PROTECTED] writes: On 7/11, I replied to one of your earlier posts on this problem wiht the following: chemYield - function(a, x)(a[1]+(a[3]-a[2])/(1+exp(-a[2]*(x-a[4])) This can be used in optim but not nls. Mimicking an example in the documentation for nls

Re: [R] Sorting a data frame

2003-07-16 Thread Marc Schwartz
On Wed, 2003-07-16 at 08:42, Wayne Jones wrote: Hi there R-Helpers, Does anyone know if it is possible to sort a dataframe? I.e. Sort alphabetically column 1 ( which has some reocurring elements) then sort alphabetically column2 but keeping the order of column 1 constant; much the same

Re: [R] eigen vector sign reversal

2003-07-16 Thread Thomas Lumley
On Tue, 15 Jul 2003, Roger D. Peng wrote: I think at version 1.7.0 R started using LAPACK for its eigen/svd routines. I think using `eigen(x, EISPACK = TRUE)' uses the previous version. Yes, but as the sign of eigenvectors is not well-defined it may be better to fix the scripts so that they

Re: [R] Tobit analysis

2003-07-16 Thread David Firth
Gaussian and normal are two different words for the same thing. The example at http://www.biostat.wustl.edu/archives/html/s-news/1999-06/msg00125.html should give you plenty of clues. David On Wednesday, Jul 16, 2003, at 16:26 Europe/London, Andrew Barnes wrote: Having read previous

Re: [R] turning list-elements into a vector

2003-07-16 Thread Douglas Bates
Michael Kirschbaum [EMAIL PROTECTED] writes: I want to create a vector from specific matrix-elements( e.g.[1,1]) these matrices are elements of a list. Is there any possibility to work without a loop? (e.g. with lapply?) Sounds like you want lapply(mlist, [, i = 1, j = 1) where mlist is

[R] Re: Four-parameter logistic [was Re: Info]

2003-07-16 Thread Spencer Graves
Dear Doug: Thanks for your reply and clarifications. I greatly appreciate them. I preach the Gospel of Bates Watts every chance I get, but life has given me so many other problems to solve that I don't know your works as well as I would like. Best Wishes, Spencer Graves Douglas Bates

Re: [R] turning list-elements into a vector

2003-07-16 Thread Spencer Graves
Have you considere unlist? Also, note that a matrix is a vector with a dim attribute, and a data.frame is actually a list with some other attributes. hope this helps. spencer graves Michael Kirschbaum wrote: Hi. Can anyone help me? I want to create a vector from specific matrix-elements(

RE: [R] turning list-elements into a vector

2003-07-16 Thread Liaw, Andy
Something like this? myvec - sapply(list.of.mat, function(x) x[i, j]) If all the matrices are of the same dimension, it might be easier to make them into an array, and just slice through the array. Andy -Original Message- From: Michael Kirschbaum [mailto:[EMAIL PROTECTED] Sent:

Re: [R] turning list-elements into a vector

2003-07-16 Thread Uwe Ligges
Michael Kirschbaum wrote: Hi. Can anyone help me? I want to create a vector from specific matrix-elements( e.g.[1,1]) these matrices are elements of a list. Is there any possibility to work without a loop? (e.g. with lapply?) hope, you can help me thank you Michael [[alternative HTML version

Re: [R] turning list-elements into a vector

2003-07-16 Thread huan . huang
hi Emkiba, try this: x - matrix(1:12, 4, 3) y - matrix(x, 12, 1) yy - y[,1] regards, Huan Internet [EMAIL PROTECTED]@stat.math.ethz.ch - 07/16/2003 03:24 PM Sent by:[EMAIL PROTECTED] To:r-help cc: Subject:[R] turning list-elements into a vector Hi. Can anyone help me? I

[R] bwplot does something weird with Hmisc library attached

2003-07-16 Thread Petr Pikal
Dear all I would like to ask you about possible bug in using bwplot (from lattice) together with Hmisc library attached. I found it in my actual data, but here is a toy example. It appears only when some levels are missing. library(lattice) library(Hmisc) # preparing data x1-rnorm(10,5,1)

Re: [R] Excel can do what R can't?????

2003-07-16 Thread Michael Rennie
Hi, Spencer I know I submitted a beastly ammount of code, but I'm not sure how to simplify it much further, and still sucessfully address the problem that i am having. The reason being is that the funciton begins f- function (q) At the top of the iterative loop. This is what takes q and

[R] Line plot help

2003-07-16 Thread Carlos Rios
I was wondering if is there any way of plotting line segments on a plot. Actually I need a graph that shows the advantage of using a different method for estimate the parameter of my databse, so I've plotted the N estimatives for M areas in my database and then I've plotted the new estimation

Re: [R] Line plot help

2003-07-16 Thread Spencer Graves
Standard advice: plot to set xlim and ylim, then a loop with a separate call to lines in a loop for each line desired. Someone else may have something better for your current needs, but this works for me. hope this helps. spencer graves Carlos Rios wrote: I was wondering if is there any way

Re: [R] Line plot help

2003-07-16 Thread James MacDonald
Segments should do what you want. Try ?segments for help. Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 Carlos Rios [EMAIL PROTECTED] 07/16/03 12:26PM I was wondering if

[R] Is there a bug in qr(..,LAPACK=T)

2003-07-16 Thread Mike Meyer
The following snippet suggests that there is either a bug in qr(,LAPACK=T), or some bug in my understanding. Note that the detected rank is correct (= 2) using the default LINPACK qr, but incorrect (=3) using LAPACK. This is running on Linux Redhat 9.0, using the lapack library that comes

Re: [R] Is there a bug in qr(..,LAPACK=T)

2003-07-16 Thread Ravi Varadhan
As the help page for qr says, LAPACK does not attempt to detect linear dependencies or rank deficiencies, so you should not use the value of rank obtained with argument, LAPACK = TRUE. Computing the rank of a matrix using finite precision is difficult, as the example on the help page for qr

[R] Fatal error in SJava.

2003-07-16 Thread Vicky Albornoz
Dear r-helpers, I have been trying to invoke R from Java in a Windows 2000 computer (unfortunately). All my environment variables seem to be properly set, everything seems to be in order, but I obtaining a Fatal error: unable to open the base package error window. Also, the output of the

Re: [R] Is there a bug in qr(..,LAPACK=T)

2003-07-16 Thread Mike Meyer
Several people have kindly (and gently) pointed out that the ?qr documentation states that rank detection does not work for the LAPACK case. Its my fault for assuming that rank detection did work. --Mike On Wed, 16 Jul 2003 09:54:39 -0700 Mike Meyer [EMAIL PROTECTED] wrote: The following

Re: [R] Fatal error in SJava.

2003-07-16 Thread Christian Schulz
Perhaps you forget the entry in your /rw1071/.Renviron like: JAVA_HOME=c:/yourPath/Java/j2re1.4.1_02 ? library(SJava) using JAVA_HOME = c:/Programme/Java/j2re1.4.1_02 regards,christian - Original Message - From: Vicky Albornoz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday,

[R] Q re Linear Models

2003-07-16 Thread Joerg Evermann
Hello, I apologize in advance if what I'm about to ask is trivial or has been answered before. In the latter case I would appreciate a pointer to the right list/location I'm trying to model the following experimental design with groupedData and lme in R: Subjects were measured on two tasks

RE: [R] Excel can do what R can't?????

2003-07-16 Thread Michael Rennie
Hi, Reid Do the values of W and Hg over time for a given q agree between R and Excel? Not the optimal value of q, just the trajectories for fixed q (trying several values for q). If I take the iterative loop out of the function, and ask for values of Hgmod, Hgtmod, and f, then I get EXACTLY what

Re: [R] Excel can do what R can't?????

2003-07-16 Thread Spencer Graves
I'm confused: I've done this type of thing by programming the same objective function in R (or S-Plus) and Excel. After the answers from my objective function in R match the answers in Excel, then I pass that objective function to something like optim, which then finds the same answers

[R] AR in R

2003-07-16 Thread CHRISS Steve
R Help, How does one do a least squares regression with an AR component (for any order) in R? Thanks, Steve Chriss Steve W. Chriss Oregon Public Utility Commission P: 503.378.3778 F: 503.373.7752 E: [EMAIL PROTECTED]

Re: [R] AR in R

2003-07-16 Thread John Fox
Dear Steve, At 11:45 AM 7/16/2003 -0700, CHRISS Steve wrote: R Help, How does one do a least squares regression with an AR component (for any order) in R? Thanks, Steve Chriss Do you mean a model with AR errors? If so, you can use the gls (generalized least squares) function in the nlme package.

Re: [R] Specifying an lme model

2003-07-16 Thread BORGULYA Gábor
Dear Ross, I think I can not answer your question, but I have three ideas that might be useful: 1. Cluster randomized trials often ask similar questions. Having a look at CRT methods may suggest you a solution. 2. Similar questions may arise in time series analysis. I wouldn't be surprised if

[R] list to data frame

2003-07-16 Thread Jesper Runge Madsen
Dear R helpers I am trying to convert a list into a data frame but when I try, I get a stack overflow error (Error: protect(): stack overflow). My list contains about 17000 rows and looks like shown at the bottom. The reason that I want to convert it in to a data frame is that I want to export it

Re: [R] Excel can do what R can't?????

2003-07-16 Thread Spencer Graves
Clearly there is much I don't understand about your problem. I suspect you are doing something that isn't correct in R, and the complexity of the problem makes it difficult for you or anyone else to isolate the likely error. Have you tried discarding Hg (or W) and simplifying the

RE: [R] Excel can do what R can't?????

2003-07-16 Thread Michael Rennie
Hi, Reid and Spencer- I think I've figured something out pretty critical to the problem. Loking at my 'solver' options, I have a condition added that 'Hgtmod = Hgt'. Without this conditional statement, I have to run solver 3-4 times before I get a final solution. MEANING- solver and R,

[R] duplicate row.names

2003-07-16 Thread John Smith
I am looping over many data files and reading in the data with F - read.table(filename)to read in a 22000 by 15 matrix. Works fine on the first matrix F, but I get the following error when the second file is read into F: Error in row.names-.data.frame(*tmp*, value = row.names) :

Re: [R] list to data frame

2003-07-16 Thread Peter Dalgaard BSA
Jesper Runge Madsen [EMAIL PROTECTED] writes: Dear R helpers I am trying to convert a list into a data frame but when I try, I get a stack overflow error (Error: protect(): stack overflow). My list contains about 17000 rows and looks like shown at the bottom. The reason that I want to

Re: [R] Excel can do what R can't?????

2003-07-16 Thread Spencer Graves
I don't expect you to have a complete solution from the simplifications. I expect you to learn something from the toy problems that can help you solve the real problems. Michael Rennie wrote: Hmmm. I tried entering 'Hgtmod = Hgt' at the end of my 'optim' function, but that didn't help me

RE: [R] duplicate row.names

2003-07-16 Thread Adaikalavan Ramasamy
The row.names argument (if present) defines which column is to be used as the row names. The default in read.table() is missing row.names and hence row.names is not detected. The row names (if present) need to be unique. Giving us your code would have been helpful, but I am guessing you have set

Re: [R] Excel can do what R can't?????

2003-07-16 Thread Roger D. Peng
I'm having a little difficulty understanding this thread. If Excel can do the job correctly and suits your needs, why not just use Excel? As far as I know, 'optim' cannot optimize a function subject to arbitrary equality constraints. The 'constrOptim' function allows for linear inequality

Re: [R] list to data frame

2003-07-16 Thread M.Kondrin
Jesper Runge Madsen wrote: Dear R helpers I am trying to convert a list into a data frame but when I try, I get a stack overflow error (Error: protect(): stack overflow). My list contains about 17000 rows and looks like shown at the bottom. The reason that I want to convert it in to a data frame