RE: [R] postscript/eps label clipping

2003-07-11 Thread Mulholland, Tom
I guess I was wrong there. However it does seem that it will come down to fontsize 9 without clipping (or if it does I find it hard to see). -Original Message- From: Mulholland, Tom Sent: Friday, 11 July 2003 1:38 PM To: David Forrest; [EMAIL PROTECTED] Subject: RE: [R] postscript/eps

[R] Sections for help files

2003-07-11 Thread Rob Hyndman
When compiling a package, is there any way of making the help files (html or chtml) have separate sections for functions and data sets? When looking at the help file for a package with a large number of help pages, it would be nice to have the functions appear first and the data sets appear second

[R] info

2003-07-11 Thread Andrea Calandra
HI I'm a student in chemical engineering, and i have to implement an algoritm about FIVE PARAMETERS INTERPOLATION for a calibration curve (dose, optical density) y = a + (c - a) /(1+ e[-b(x-m]) where x = ln(analyte dose + 1) y = the optical absorbance data a = the curves top asymptote b = the

Re: [R] Exporting data

2003-07-11 Thread Jonathan Baron
On 07/11/03 09:58, C.E.Marshall wrote: I am running simulations calculating correlation coefficients from bivariate data and I was wondering whether there is a way of exporting 1000 simulation results from R to a text file or to another file for further manipulation. I am having difficulty I

Re: [R] info

2003-07-11 Thread Spencer Graves
I assume you mean the following: chemYield - function(a, x)(a[1]+(a[3]-a[2])/(1+exp(-a[2]*(x-a[4])) If you want to estimate parameters a[1:4] from data on pairs of (x, y=chemYield), create a data.frame(x, y), and estimate the parameter vector a using nls. If you have trouble getting nls

[R] unz()

2003-07-11 Thread Marsland, John
I am having problems getting the unz() function to work as a connection to start reading a file... z - unz(c:/temp/stoxx.zip, close_tmi_components.txt, r) readLines(z,2) yields the following problems: z - unz(c:/temp/stoxx.zip, close_tmi_components.txt, r) Error in unz(c:/temp/stoxx.zip,

[R] unimodality test

2003-07-11 Thread Jerome Sackur
Dear R users, I am interested in uni- bi- multimodality tests, for analysing reaction times data. I was lead to Hartigan's dip test (Ann. Statistics, 13, 1985, pp. 70-84, Applied Statistics, 34, 1985, 320-325). Not being a programmer I am unable to translate the Fortran code given in ref. 2 into

[R] short puzzles

2003-07-11 Thread Marc Vandemeulebroecke
Dear R users, can someone help with these short puzzles? 1) Is there a function like outer() that evaluates a three-argument function on a threedimensional grid - or else how to define such a function, say, outer.3()? E.g., calculate (x/y)^z on (x,y,z) element of {1,2,3}x{3,4}x{4,5} and return

Re: [R] FITS File Reader

2003-07-11 Thread Duncan Murdoch
On Thu, 10 Jul 2003 19:09:16 -0700 (PDT), Nicholas Konidaris [EMAIL PROTECTED] wrote : Dear R users, I have searched the web and CRAN fairly carefully. Does a FITS format file reader for R currently exist that I can download? www.wotsit.org has a 13 year old document describing FITS,

Re: [R] short puzzles

2003-07-11 Thread Sundar Dorai-Raj
Marc Vandemeulebroecke wrote: Dear R users, can someone help with these short puzzles? 1) Is there a function like outer() that evaluates a three-argument function on a threedimensional grid - or else how to define such a function, say, outer.3()? E.g., calculate (x/y)^z on (x,y,z) element of

Re: [R] FITS File Reader

2003-07-11 Thread Barry Rowlingson
Duncan Murdoch wrote: If you do locate code to read it, or you end up writing some yourself, you should consider contributing it to the foreign package. There's a C (and fortran)-level library for reading FITS files here: http://heasarc.gsfc.nasa.gov/docs/software/fitsio/fitsio.html - together

Re: [R] Nonliner Rgression using Neural Nnetworks

2003-07-11 Thread Frank E Harrell Jr
On Fri, 11 Jul 2003 18:56:58 +0900 Yukihiro Ishii [EMAIL PROTECTED] wrote: Hi, I am an old hand at chemistry but a complete beginner at statistics including R computations. My question is whether you can carry out nonlinear multivariate regression analysis in R using neural networks,

RE: [R] info

2003-07-11 Thread Paul, David A
The most commonly used dose-response functions for nonlinear calibration curves are the four- and five-parameter logistic functions. The four- parameter logistic is specified as F(z) = delta + (alpha - delta)/(1 + (z/gamma)^beta) so I'm not sure where you are getting your dose-response

[R] correlation, import of large tables,test for point-biserial c.c.?

2003-07-11 Thread ArneSaatkamp
Dear R help community, I want to calculate correlations between environment parameters and species abundance data. When I use the cor() for my table (121 columns 91 rows) R generates a dataset with the correlations between all columns; 1) How can I limit the calculations to the correlations of

Re: [R] unimodality test

2003-07-11 Thread Martin Maechler
Jerome == Jerome Sackur [EMAIL PROTECTED] on Fri, 11 Jul 2003 12:17:33 +0200 (MET DST) writes: Jerome Dear R users, I am interested in uni- bi- Jerome multimodality tests, for analysing reaction times Jerome data. I was lead to Hartigan's dip test Jerome (Ann. Statistics,

[R] hazard estimate

2003-07-11 Thread Dr. Peter Schlattmann
Dear list, is there a function available which provides an estimate of the hazard function based on a cox proportional hazard model? I only found the cumulative hazard and the survival function as survfit options. Thanks for your help Peter __ [EMAIL

RE: [R] Exporting data

2003-07-11 Thread Adaikalavan Ramasamy
This really depends on what your output is. As previously suggested save() and write() are excellent suggestions. for(ii in 1:1000){ out - cor( x[ii, ], y[ii, ] ) # or whatever cat(ii, \t, out, \n, append=TRUE, file=output.txt) } This method is really not worth it for small

[R] Offsets in glmmPQL?

2003-07-11 Thread Anon.
I've got a colleague who's using a GLMM to analyse her data, and I've told her that she needs to include an offset. However, glmmPQL doesn't seem to allow one to be included. Is there anyway of doing this? Bob -- Bob O'Hara Rolf Nevanlinna Institute P.O. Box 4 (Yliopistonkatu 5) FIN-00014

Re: [R] info

2003-07-11 Thread Spencer Graves
Calandra's dose-response function is very close to what you wrote: She has x = ln(z+1), while x = ln(z) and m = ln(gamma) would give what you wrote. I would guess that your comments and references should help her. Spencer Graves Paul, David A wrote: The most commonly used dose-response

Re: [R] hazard estimate

2003-07-11 Thread Spencer Graves
The hazard function is the derivative of the cumulate hazard. There was a discussion only a few days ago on smoothing the hazard rate, which as I recall may have dealt with smoothing the cumulative hazard and then differentiating that. Have you checked http://www.r-project.org/ - search

Re: [R] correlation, import of large tables, test for point-biserialc.c.?

2003-07-11 Thread Spencer Graves
Did you look at ?cor? The documentation observes that cor accepts an optional second argument. The following works: df1 - data.frame(a=1:8, b=rep(c(-1, 1), 4), + c=rep(c(-1, 1), each=4)) cor(df1[,1], df1[, -1]) b c [1,] 0.2182179 0.8728716 hope this helps. spencer

RE: [R] correlation, import of large tables,test for point-biserial c.c.?

2003-07-11 Thread Adaikalavan Ramasamy
1) Calculating a 121 x 121 correlation matrix and then extracting the relevant correlating is extremely inefficient and slow. Instead try this : data - as.matrix( data ) # data is your 91 x 121 matrix or dataframe colInterest - data[ ,1] apply( data, 2, function(x)

Re: [R] hazard estimate

2003-07-11 Thread Ruud H. Koning
library(survival) ?basehaz gives For `basehaz', a dataframe with the baseline hazard, times, and strata. Ruud *** REPLY SEPARATOR *** On 7/11/2003 at 4:01 Dr. Peter Schlattmann wrote: Dear list, is there a function available which provides an estimate of the

Thanks: [R] short puzzles

2003-07-11 Thread Marc Vandemeulebroecke
Thanks to Andy Liaw, Patrick Burns, Sundar Dorai-Raj and Matthiew Wiener for the answers to my puzzles. Here is a summary: ** The original question: ** Dear R users, can someone help with these short puzzles? 1) Is there a function like outer() that

RE: [R] unz()

2003-07-11 Thread Marsland, John
I've solve my own problem! apologies. For the record: the filename argument should include the full path of the file within the directory structure of the zip file. but there seeks to be an issue with readLines: readLines(z,2) Error in readLines(z, 2) : seek not enabled for this connection

[R] metapost device in R (again ;-)

2003-07-11 Thread Tamas Papp
Hi, I read the 2000 thread on a MetaPost device in R. If I understand correctly, the main problem with the concept is that R wants the device driver to give back information on the size of strings/labels. To the bet of my knowledge, MetaPost _does_ make it possible to measure the bounding box of

[R] How to plot a scatter-plot matrix?

2003-07-11 Thread Feng Zhang
Hey, R-listers I am going to plot a scatter-plot matrix using R. For example, give a matrix X=[x1, x2, ..., xn] where each xi is a column vector, how to plot all the pair scatter-plots between two different xi and xj? Is PAIRS able to achieve this function? Thanks for your help. Fred

[R] 3d plot with different levels done in different colors

2003-07-11 Thread Tamas Papp
I would like a 3d plot of a matrix such that individual trapezoids that make up the surface are colored according to the z-value of that point (or preferably the midpoint of its four corners, or something similar). MS Excel has something like that. I know that persp can have an nx by ny matrix

Re: [R] info

2003-07-11 Thread Douglas Bates
Andrea Calandra [EMAIL PROTECTED] writes: I'm a student in chemical engineering, and i have to implement an algoritm about FIVE PARAMETERS INTERPOLATION for a calibration curve (dose, optical density) y = a + (c - a) /(1+ e[-b(x-m]) where x = ln(analyte dose + 1) y = the optical

Re: [R] hazard estimate

2003-07-11 Thread Thomas Lumley
On Fri, 11 Jul 2003, Ruud H. Koning wrote: library(survival) ?basehaz gives For `basehaz', a dataframe with the baseline hazard, times, and strata. Yes, but that's the cumulative hazard, not the hazard rate. -thomas Thomas Lumley Assoc. Professor,

[R] using SVD to get an inverse matrix of covariance matrix

2003-07-11 Thread ge yreyt
Dear R-users, I have one question about using SVD to get an inverse matrix of covariance matrix Sometimes I met many singular values d are close to 0: look this example $d [1] 4.178853e+00 2.722005e+00 2.139863e+00 1.867628e+00 1.588967e+00 [6] 1.401554e+00 1.256964e+00 1.185750e+00

Re: [R] How to plot a scatter-plot matrix?

2003-07-11 Thread Gavin Simpson
Fred, [from help on pairs() ]: ... Arguments: x: the coordinates of points given as columns of a matrix. So yes, pairs will do what you ask. See ?pairs for more info. Also you might consider the alternative function from the lattice package: library(lattice) #load lattice graphics

Re: [R] Offsets in glmmPQL?

2003-07-11 Thread Douglas Bates
Anon. [EMAIL PROTECTED] writes: I've got a colleague who's using a GLMM to analyse her data, and I've told her that she needs to include an offset. However, glmmPQL doesn't seem to allow one to be included. Is there anyway of doing this? We just discovered and fixed a similar problem in

Re: [R] using SVD to get an inverse matrix of covariance matrix

2003-07-11 Thread Jerome Asselin
If some of the eigenvalues of a square matrix are (close to) zero, then it's inverse does not exist. However, you can always calculate it's generalized inverse ginv(). library(MASS) help(ginv) It'll allow you to specify a tol argument: tol: A relative tolerance to detect zero singular

[R] Constraining asymptote in SSasymp

2003-07-11 Thread Martin Biuw
Hi all, Is there a simple way to constrain the Asym argument in the SSasymp function so that it does not exceed some maximum value? Thanks! Martin -- Martin Biuw Sea Mammal Research Unit Gatty Marine Laboratory, University of St Andrews St Andrews, Fife KY16 8PA Scotland Ph: +44-(0)1334-462637

[R] Indexing with NA as FALSE??

2003-07-11 Thread ted . harding
Hi Folks, Example: t-c(1,2,3,4,5,6,7,8,9) u-c(1,NA,3,NA,5,NA,7,NA,9) t[u==5] -- NA NA 5 NA NA Now, if I could somehow set things so that NA was FALSE for indexing, then t[u==5] -- 5 I know I can do it with t[(u==5)(!is.na(u))] but in the situation I am dealing with this leads to massively

Re: [R] Indexing with NA as FALSE??

2003-07-11 Thread Barry Rowlingson
[EMAIL PROTECTED] wrote: I know I can do it with t[(u==5)(!is.na(u))] but in the situation I am dealing with this leads to massively cumbersome, typo-prone and hard-to-read code. You could redefine '[' or '==', but that would lead to massively dangerous code. Anything could happen. Anyone who

Re: [R] Indexing with NA as FALSE??

2003-07-11 Thread Thomas Lumley
On Fri, 11 Jul 2003 [EMAIL PROTECTED] wrote: Hi Folks, Example: t-c(1,2,3,4,5,6,7,8,9) u-c(1,NA,3,NA,5,NA,7,NA,9) t[u==5] -- NA NA 5 NA NA Now, if I could somehow set things so that NA was FALSE for indexing, then t[u==5] -- 5 t[u %in% 5] I know I can do it with

[R] three short questions

2003-07-11 Thread javier garcia - CEBAS
Hi all; This is my first message to the list, and I've got three basic questions: How could I insert comments in a file with commands to be used as source in R? Is it possible to quickly display a window with all the colors available in colors()? How? I'm displaying points, but they overlap,

[R] Question regarding irts class

2003-07-11 Thread Luis Torgo
I'm using the new irts class from package tseries which I find quite useful. However, I have data of different type being sample at irregular times (i.e. my data is more of a data frame than a matrix). Function irts that is used to create irts objects demands that the value component is either a

Re: [R] three short questions

2003-07-11 Thread J.R. Lockwood
This is my first message to the list, and I've got three basic questions: How could I insert comments in a file with commands to be used as source in R? use the pound sign # Is it possible to quickly display a window with all the colors available in colors()? How? I've got such a

[R] Reading data from the console

2003-07-11 Thread Doru Cojoc
I want to be able to write a program in R that does the following: - it allows the user to enter the dimensions of the matrix from the console - it allows the user then to enter each element of the matrix from the console. I am looking for an equivalent for the C++ command read, or read.ln.

Re: [R] Reading data from the console

2003-07-11 Thread Jerome Asselin
Put your code in a function. See below. Cheers, Jerome mat - function() { cat('Number of populations:', '\n') m-scan(,n=1, quiet=TRUE) cat('Number of categories:', '\n') k-scan(,n=1, quiet=TRUE) N-matrix(0,m,k) for(i in 1:m) for(j in 1:k) { N[i,j]-scan(,n=1, quiet=TRUE) } N } mat() Number

Re: [R] three short questions

2003-07-11 Thread Marc Schwartz
On Fri, 2003-07-11 at 12:27, J.R. Lockwood wrote: This is my first message to the list, and I've got three basic questions: How could I insert comments in a file with commands to be used as source in R? use the pound sign # Is it possible to quickly display a window with all

Re: [R] using SVD to get an inverse matrix of covariance matrix

2003-07-11 Thread Spencer Graves
More presicely, if M is singular, then M%*%x = b will have multiple solutions only if b is in the subspace spanned by columns of M. Example: M - array(1:2, dim=c(2,2)) (svdM - svd(M)) $d [1] 3.162278 0.00 $u [,1] [,2] [1,] -0.4472136 -0.8944272 [2,] -0.8944272

RE: [R] postscript/eps label clipping

2003-07-11 Thread drf5n
On Fri, 11 Jul 2003, Mulholland, Tom wrote: I guess I was wrong there. However it does seem that it will come down to fontsize 9 without clipping (or if it does I find it hard to see). Thanks. It seemed like that is the way it was working, but it also seems counterintuitive: reduced

[R] getAnyhwhere behavior

2003-07-11 Thread Cliff Lunneborg
I would have expected the function getAnywhere to have behaved differently in the following: search() [1] .GlobalEnv file:C:/R/Rdata/miya/.Rdata [3] package:bootpackage:methods [5] package:ctest package:mva [7] package:modreg

[R] spdep

2003-07-11 Thread Mark Piorecky
Hi everyone, The Spatial Dependence (spdep) library, has a function called 'dnearneigh', which identifies neighbours of region points by Euclidean distance between lower (greater than) and upper (less than or equal to) bounds. The function returns a list of integer vectors giving the region

Re: [R] 3d plot with different levels done in different colors

2003-07-11 Thread Jerome Asselin
Hi, Consider this example which I have modified from the persp() help file. It uses topo.colors() to create a series of colors. Cheers, Jerome x - seq(-10, 10, length= 30) y - x f - function(x,y) { r - sqrt(x^2+y^2); 10 * sin(r)/r } z - outer(x, y, f) z[is.na(z)] - 1

[R] How to generate regression matrix with correlation matrix

2003-07-11 Thread rui
Dear R community: I want to simulate a regression matrix which is generated from an orthonormal matrix X of dimension 30*10 with different between-column pairwise correlation coefficients generated from uniform distribution U(-1,1). Thanks in advance! Rui [[alternative HTML version

Re: [R] How to generate regression matrix with correlation matrix

2003-07-11 Thread Spencer Graves
What problem are you really trying to solve? The problem statement as I read it contains two logical contradictions that I see: 1. Orthonormal means X'X = Identity matrix (10 x 10). That means the pairwise correlation coefficients can NOT be different from 0. 2. Not all symmetric

[R] ss's are incorrect from aov with multiple factors

2003-07-11 Thread John Christie
Hi, I have been trying to work with error terms given back from aov to make confidence intervals. However, the numbers seem to be incorrect. If there is more than one term in the ANOVA then the error terms can be inflated by the number of factors in the extra terms. The F's are correct so

[R] More clear statement about the question of how to generateregression matrix with correlation matrix

2003-07-11 Thread rui
Dear R community: I am trying to do a simulation study mentioned by Fu (1998), Journal of Computational and Graphical Statistics, Volume7, Number 3, Page 397-416. In order to give a clear statement of quesion I copy the following paragraph from the article: We compare the bridge model with the

Re: [R] ss's are incorrect from aov with multiple factors

2003-07-11 Thread JRG
On 11 Jul 03, at 21:20, John Christie wrote: Hi, I have been trying to work with error terms given back from aov to make confidence intervals. However, the numbers seem to be incorrect. If there is more than one term in the ANOVA then the error terms can be inflated by the number

Re: [R] More clear statement about the question of how to generateregression matrix with correlation matrix

2003-07-11 Thread Spencer Graves
Dear Rui: If noone else responds, I suggest you forward my earlier comments to Fu and ask him. Spencer Graves rui wrote: Dear R community: I am trying to do a simulation study mentioned by Fu (1998), Journal of Computational and Graphical Statistics, Volume7, Number 3, Page 397-416. In

Re: [R] ss's are incorrect from aov with multiple factors

2003-07-11 Thread John Christie
On Friday, July 11, 2003, at 09:38 PM, JRG wrote: On 11 Jul 03, at 21:20, John Christie wrote: In what sense are the SSs incorrect, exactly? And what do you think the correct values should be? Well, if I take the residuals for one of the main effects I should be able to calculate a

Re: [R] Nonliner Rgression using Neural Nnetworks

2003-07-11 Thread kjetil brinchmann halvorsen
On 11 Jul 2003 at 18:56, Yukihiro Ishii wrote: Hi, I am an old hand at chemistry but a complete beginner at statistics including R computations. My question is whether you can carry out nonlinear multivariate regression analysis in R using neural networks, where the output variable can

Re: [R] ss's are incorrect from aov with multiple factors

2003-07-11 Thread Spencer Graves
Dear John Christie: People tend to get the quickest and most helpful responses when they provide a toy problem that produces what they think are anamolous results. This increases the chances that someone will be able to provide a sensible answer in the few seconds they have available for

[R] help with bivariate density plot question

2003-07-11 Thread liping
Dear R users: I have a dataset with two variables (2 observations, two samples from same subject) and I used kernSur from library(Genkern) to get a estimated bivariate density and corresponding plots as follows: new.data.normal-data.normal[!is.na(data.normal[,2]),] x-new.data.normal[,2]

[R] ss's are incorrect from aov with multiple factors (EXAMPLE!)

2003-07-11 Thread John Christie
OK, I do see that there is a problem in my first email. I have noticed this with repeated measures designs. Otherwise, of course, there is only one error term for all factors. But, with repeated measures designs this is not the case. On Friday, July 11, 2003, at 10:00 PM, Spencer Graves