Re: [R] nls and na/Nan/Inf error

2005-09-26 Thread Gabor Grothendieck
Use a grid search to get the starting values in which case you will likely be close enough that you won't run into problems even without derivatives: attach(fldgd) grid - expand.grid(Vr = seq(0,.3,.1), Vm = seq(.45, 1, .05), alpha = seq(1,2,.25), lamda = seq(1,2,.25)) ss - function(p)

Re: [R] Indentation in R code

2005-09-26 Thread Martin Maechler
I'm crossposting to the ESS-help mailing list which is slightly more appropriate here. [This may be a rare case where crossposting seems to make much sense.] PD == Peter Dalgaard [EMAIL PROTECTED] on 25 Sep 2005 19:40:45 +0200 writes: PD Seth Falcon [EMAIL PROTECTED] writes: On

Re: [R] nls and na/Nan/Inf error

2005-09-26 Thread Prof Brian Ripley
This works if you omit the deriv() step. Use R's options(error=dump.frames) and debugger(). This gives Browse[1] rhs [1] 0.433 0.4272571 0.3994105 0.3594037 0.3270730 0.3104752 0.3000927 [8] 0.2928445 0.2874249 0.2831787 attr(,gradient) VrVm alphalamda

Re: [R] SAX Parser best practise

2005-09-26 Thread Jan Hummel
Hi Duncan, thanks again for your comments. I dug around in the libxml code and the Web to verify that validation is indeed only possible in libxml when one uses DOM (i.e. xmlTreeParse()). Using DOM is not an option for me, so I need to validate the xml parts I'm interested in within my

[R] How to get the rowindices without using which?

2005-09-26 Thread Martin Lam
Hi, I was wondering if it is possible to get the rowindices without using the function which because I don't have a restriction criteria. Here's an example of what I mean: # take 10 randomly selected instances iris[sample(1:nrow(iris), 10),] # output Sepal.Length Sepal.Width Petal.Length

Re: [R] How to get the rowindices without using which?

2005-09-26 Thread Dimitris Rizopoulos
try this: dat - iris[sample(1:nrow(iris), 10), ] dat match(rownames(dat), rownames(iris)) 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:

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Antonio, Fabio Di Narzo
Tnx very much Dimitris, your code does what I need. I've just adapted it to my needs (e.g., I don't deal with scalar functions), and so solved my problem. Given this, is there a way to use the deriv function in the base package, within this context (variable length vector of indipendent

[R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Knut Krueger
. I am looking for a histogram or box plot with the adding normal distribution curve I think that must be possible, but I am not able to find out how to do. Regards Knut __ R-help@stat.math.ethz.ch mailing list

[R] figure widths in sweave

2005-09-26 Thread John Charles Considine
gRoovers, Can the size of figures be controlled from within a noweb document without resorting to editing the \includegraphics sections in the .tex file? Can the figure widths be set in the environmental declarations at the start? Can they be set within the \begin{figure} environment? JC

Re: [R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Petr Pikal
Hi answered hundered times. Dear R people: I would like to superimpose a normal curve on a histogram. x-rnorm(150) h-hist(x,breaks=15) xhist-c(min(h$breaks),h$breaks) yhist-c(0,h$density,0) xfit-seq(min(x),max(x),length=40) yfit-dnorm(xfit,mean=mean(x),sd=sd(x))

Re: [R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Romain Francois
Le 25.09.2005 14:34, Knut Krueger a écrit : . I am looking for a histogram or box plot with the adding normal distribution curve I think that must be possible, but I am not able to find out how to do. Regards Knut Hi Knut, There are a lot of ways to do that, let x be your data (assume

Re: [R] anova on binomial LMER objects

2005-09-26 Thread Douglas Bates
On 9/25/05, Horacio Montenegro [EMAIL PROTECTED] wrote: Hi Spencer and Robert, I have found the same behaviour, but only for lme4 and Matrix after the 0.96 release. lme4 0.95-10 and Matrix 0.95-13 releases gave sensible results. This could be an introduced bug, or a solved bug - you

Re: [R] merge maps from shapefile to lattice

2005-09-26 Thread Roger Bivand
On Mon, 26 Sep 2005, Toni Viúdez wrote: Hi everybody: Could anybody help how I solve the next problem?. I'm doing interpolation maps of tropospheric ozone of my region, and after create it using IDW, and kriging methods, I want from shapefiles (*.shx, *.shp, *.dbf, *.sbx *.sbn ) create

[R] regression methods for circular(?) data.

2005-09-26 Thread nwew
Dear R-users, I have the following data x - runif(300,min=1,max=230) y - x*0.005 + 0.2 y - y+rnorm(100,mean=0,sd=0.1) y - y%%1 # --- modulo operation plot(x,y) and would like to recapture the slope (0.005) and intercept(0.2). I wonder if there are any clever algorithms to do this. I was

[R] Error Message - Error: symbol print-name too long

2005-09-26 Thread Carl Anderson
Dear All, I write to ask for information regarding the error message: Error: symbol print-name too long. I am afraid that I can't include any code to help with any further diagnosis of the problem as the code is far too long to be of any use, and I have not been able to re-create the problem

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Randall R Schulz
Dimitris, I'm new to R programming, and I'm trying to learn the proper way to do certain things. E.g., I had a piece of code with explicit iteration to apply some computations to a vector. It was pretty slow. I found a way to utilize R's built-in vectorization and it was sped up considerably.

[R] create trend variable in a regression using R

2005-09-26 Thread giacomo moro
Hi, my name is Giacomo. I would like to know how to create a Trend variable in a regression using R. Thank you for your help. My best regards, Giacomo - [[alternative HTML version deleted]]

[R] histogram - one bin for all values larger than a certain value

2005-09-26 Thread Florian Defregger
Dear all, I wonder if I can put together a histogram where one bin contains all the values that are larger than a certain specified value. Example: I have values ranging from 0 to 40 and I want 10 bins from 0 to 10, i.e. for the intervals [0,1), [1,2) , ..., [9,10). And then I want one last bin

Re: [R] SAX Parser best practise

2005-09-26 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 When you uncomment the two lines, your document becomes two nodes spectrum ... spectrum spectrum ... /spectrum XML requires that there be a single top-level node. And so the parser throws an error saying Extra content at the end of the

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Dimitris Rizopoulos
Randall, thanks for your comments; however, you have to take into account what is the purpose of the function here! The goal is to approximate *partial* derivatives numerically, using in fact the definition of the partial derivatives. If you recall this definition I hope that you can see why

Re: [R] histogram - one bin for all values larger than a certain value

2005-09-26 Thread Sundar Dorai-Raj
Florian Defregger wrote: Dear all, I wonder if I can put together a histogram where one bin contains all the values that are larger than a certain specified value. Example: I have values ranging from 0 to 40 and I want 10 bins from 0 to 10, i.e. for the intervals [0,1), [1,2) , ...,

[R] k-d tree for loess

2005-09-26 Thread Carlisle Thacker
I am exploring the use of loess for oceanographic applications and would like to plot the locations (longitude and latitude) points where the models (salinity~temperature*longitude*latitude,parametric=temperature) are fitted. Chambers and Hastie(1993) explains the locations are nodes of a k-d

Re: [R] getting variable length numerical gradient

2005-09-26 Thread Randall R Schulz
Dimitris, On Monday 26 September 2005 07:16, Dimitris Rizopoulos wrote: Randall, thanks for your comments; however, you have to take into account what is the purpose of the function here! The goal is to approximate *partial* derivatives numerically, ... I hope it is more clear now. Yes.

Re: [R] Error Message - Error: symbol print-name too long

2005-09-26 Thread Duncan Temple Lang
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You aren't giving us much to go on, so I can only make a very wild guess. Check that your file doesn't have a stray ` character in it. R will start reading from that point on and try to make this an internal symbol. If it doesn't find the closing

Re: [R] histogram - one bin for all values larger than a certain value

2005-09-26 Thread Romain Francois
Le 26.09.2005 16:15, Sundar Dorai-Raj a écrit : Florian Defregger wrote: Dear all, I wonder if I can put together a histogram where one bin contains all the values that are larger than a certain specified value. Example: I have values ranging from 0 to 40 and I want 10 bins from 0 to 10,

[R] quasi-random vector according to an independent graph

2005-09-26 Thread Jinfang Wang
Dear R-users, Is anyone aware of any function/package for generating a random vector from a joint distribution defined by an independent graph? Or I have to work it out myself? Thanks. Jinfang -- Jinfang Wang, Associate Professor Chiba University, Japan

Re: [R] k-d tree for loess

2005-09-26 Thread Prof Brian Ripley
First a warning: loess in R is only loosely related to loess in S, being derived from a C implementation (by the same authors). In R I don't think you can do this. Those details are never exposed, and are hidden in an undocumented C/Fortran workspace. On Mon, 26 Sep 2005, Carlisle Thacker

[R] ASA Stat. Computing and Stat. Graphics 2006 Student Paper competition

2005-09-26 Thread jose . pinheiro
The Statistical Computing and Statistical Graphics Sections of the ASA are co-sponsoring a student paper competition on the topics of Statistical Computing and Statistical Graphics. Students are encouraged to submit a paper in one of these areas, which might be original methodological research,

Re: [R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Knut Krueger
Petr Pikal schrieb: Hi answered hundered times. Dear R people: I would like to superimpose a normal curve on a histogram. x-rnorm(150) h-hist(x,breaks=15) xhist-c(min(h$breaks),h$breaks) yhist-c(0,h$density,0) xfit-seq(min(x),max(x),length=40)

[R] Help: x11 position in the Unix environment

2005-09-26 Thread Shengzhe Wu
Hello, In the Unix environment, I open a window by x11(). May I specify the position of this window by specifying the position of the top left of the window as in Windows environment? Or some other parameters can be used to do that? Thank you, Shengzhe

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Ted Harding
On 26-Sep-05 nwew wrote: Dear R-users, I have the following data x - runif(300,min=1,max=230) y - x*0.005 + 0.2 y - y+rnorm(100,mean=0,sd=0.1) y - y%%1 # --- modulo operation plot(x,y) and would like to recapture the slope (0.005) and intercept(0.2). I wonder if there are any

Re: [R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Peter Dalgaard
Knut Krueger [EMAIL PROTECTED] writes: Petr Pikal schrieb: Hi answered hundered times. Dear R people: I would like to superimpose a normal curve on a histogram. x-rnorm(150) h-hist(x,breaks=15) xhist-c(min(h$breaks),h$breaks) yhist-c(0,h$density,0)

Re: [R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Romain Francois
Le 25.09.2005 17:30, Knut Krueger a écrit : Petr Pikal schrieb: Hi answered hundered times. Dear R people: I would like to superimpose a normal curve on a histogram. x-rnorm(150) h-hist(x,breaks=15) xhist-c(min(h$breaks),h$breaks) yhist-c(0,h$density,0)

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Witold Eryk Wolski
Hi, I do not know the intercept and slope. And you have to know them in order to do something like: ix-(y 0.9*(x-50)/200 I am right? cheers (Ted Harding) wrote: On 26-Sep-05 nwew wrote: Dear R-users, I have the following data x - runif(300,min=1,max=230) y - x*0.005 + 0.2 y -

Re: [R] Help: x11 position in the Unix environment

2005-09-26 Thread Marc Schwartz (via MN)
On Mon, 2005-09-26 at 17:45 +0200, Shengzhe Wu wrote: Hello, In the Unix environment, I open a window by x11(). May I specify the position of this window by specifying the position of the top left of the window as in Windows environment? Or some other parameters can be used to do that?

[R] p-level in packages mgcv and gam

2005-09-26 Thread Denis Chabot
Hi, I am fairly new to GAM and started using package mgcv. I like the fact that optimal smoothing is automatically used (i.e. df are not determined a priori but calculated by the gam procedure). But the mgcv manual warns that p-level for the smooth can be underestimated when df are

[R] hidden markov models

2005-09-26 Thread Dr. Emilio A. Laca
Dear R community, I am looking for an R package or other software to study hidden Markov models. I need to be able to incorporate multivariate emissions and covariates for the transition probabilities. The msm package seems almost perfect for my purpose, but I do not think it allows

Re: [R] p-level in packages mgcv and gam

2005-09-26 Thread Thomas Lumley
On Mon, 26 Sep 2005, Denis Chabot wrote: But the mgcv manual warns that p-level for the smooth can be underestimated when df are estimated by the model. Most of the time my p-levels are so small that even doubling them would not result in a value close to the P=0.05 threshold, but I have one

[R] reading SAS data files

2005-09-26 Thread Dean Sonneborn
I am attempting to read in a SAS 9.1 data file. After starting R I change to the directory containing the sas data file and use the dir command to confirm that it is there. Then I run the following R-code: library(foreign) sashome - /Program Files/SAS/SAS 9.1 test-read.ssd(file.path(sashome),

Re: [R] Help: x11 position in the Unix environment

2005-09-26 Thread Barry Rowlingson
Marc Schwartz (via MN) wrote: I don't believe so. In general, under Unix/Linux, the Window Manager determines window positioning upon startup unless the application overrides this behavior. Some applications let you specify application window positioning via command line 'geometry'

Re: [R] [ESS] Indentation in R code

2005-09-26 Thread Göran Broström
On Mon, Sep 26, 2005 at 09:27:56AM +0200, Martin Maechler wrote: I'm crossposting to the ESS-help mailing list which is slightly more appropriate here. [This may be a rare case where crossposting seems to make much sense.] PD == Peter Dalgaard [EMAIL PROTECTED] on 25 Sep 2005

Re: [R] anova on binomial LMER objects

2005-09-26 Thread Martin Henry H. Stevens
Hello all, 1. Does Matrix 0.98-7 fix any of this? 2. Assuming no, how does one acquire Matrix 0.95-13? Cheers, and thank you kindly in advance, Hank On Sep 26, 2005, at 9:05 AM, Douglas Bates wrote: On 9/25/05, Horacio Montenegro [EMAIL PROTECTED] wrote: Hi Spencer and Robert, I

Re: [R] hist(x, ...) with normal distribution curve

2005-09-26 Thread Knut Krueger
Romain Francois schrieb: Do you want that : h-hist(x,breaks=10,freq = TRUE) xfit-seq(min(x),max(x),length=40) yfit-dnorm(xfit,mean=mean(x),sd=sd(x)) lines(xfit,yfit * 150 * (h$breaks[2]-h$breaks[1])) Right thats what I want ... but does it make sense to fit the line with a try and

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Ted Harding
On 26-Sep-05 Witold Eryk Wolski wrote: Hi, I do not know the intercept and slope. And you have to know them in order to do something like: ix-(y 0.9*(x-50)/200 I am right? cheers Although I really knew them from the way you generated the data, I pretended I did not know them. Read

Re: [R] anova on binomial LMER objects

2005-09-26 Thread Prof Brian Ripley
On Mon, 26 Sep 2005, Martin Henry H. Stevens wrote: Hello all, 1. Does Matrix 0.98-7 fix any of this? 2. Assuming no, how does one acquire Matrix 0.95-13? It is in the Archive on CRAN, e.g. http://cran.r-project.org/src/contrib/Archive/M/Matrix_0.95-13.tar.gz Cheers, and thank you kindly

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Witold Eryk Wolski
Ted, I agree with you that if you unwrap the data you can use lm. And you can separate the data in the way you describe. However, if you have thousands of such datasets I do not want to do it by looking at the graph. Yes the scatter may be larger as in the example and range(y) may be larger

Re: [R] reading SAS data files

2005-09-26 Thread Prof Brian Ripley
On Mon, 26 Sep 2005, Dean Sonneborn wrote: I am attempting to read in a SAS 9.1 data file. After starting R I change to the directory containing the sas data file and use the dir command to confirm that it is there. Then I run the following R-code: library(foreign) sashome - /Program

Re: [R] regression methods for circular(?) data.

2005-09-26 Thread Ted Harding
On 26-Sep-05 Witold Eryk Wolski wrote: Ted, I agree with you that if you unwrap the data you can use lm. And you can separate the data in the way you describe. However, if you have thousands of such datasets I do not want to do it by looking at the graph. Yes the scatter may be larger

Re: [R] hidden markov models

2005-09-26 Thread Ingmar Visser
Emilio, The depmix package on cran has multivariate distributions and the possibility of (linear) covariates on the parameters. If you have questions about its use feel free to contact me, best, ingmar visser On 9/26/05 6:29 PM, Dr. Emilio A. Laca [EMAIL PROTECTED] wrote: Dear R community,

Re: [R] histogram - one bin for all values larger than a certain value

2005-09-26 Thread Francisco J. Zagmutt
x=runif(100,0,40) hist(x, breaks=c(0,1,2,3,4,5,6,7,8,9,10,40)) Is this what you had in mind? Francisco From: Florian Defregger [EMAIL PROTECTED] To: r-help@stat.math.ethz.ch Subject: [R] histogram - one bin for all values larger than a certain value Date: Mon, 26 Sep 2005 15:36:21 +0200 Dear

[R] Make check fails on d-p-q-r-tests.R...

2005-09-26 Thread Jeff Ross
Hi, R-2.1.1 OS: OpenBSD-current (3.8) on i386 Compiler:gcc version 3.3.5 (propolice) Thread model: single configure \ --with-readline \ --with-tcltk \ --with-tcl-config=/usr/local/lib/tcl8.4/tclConfig.sh \ --with-tk-config=/usr/local/lib/tk8.4/tkConfig.sh \ --with-libpng \

[R] plotting multiple plots on a single graph

2005-09-26 Thread C Tate
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] less precision, please!

2005-09-26 Thread Paul MacManus
Duncan On 9/9/2005 7:41 PM, Paul MacManus wrote: I need to run qbeta on a set of 500K different parameter pairs (with a fixed quantile). For most pairs qbeta finds the solution very quickly but for a substantial minority of the cases qbeta is very slow. This occurs

[R] questions about boxplots

2005-09-26 Thread Yulei He
Hi, there. I have two questions about using R to create boxplots. 1. The function boxplot() plots the outliers. How can I label the exact values arount these outlier points? Does R have an option allow me to do that? 2. How can I put two boxplots in one x-y axis? Thanks. Yulei

[R] dates are shown as X15.Feb.03

2005-09-26 Thread Chris Buddenhagen
Why is R recognizing dates like this? Chris Buddenhagen, Botany Department, Charles Darwin Research Station, Santa Cruz,Galapagos. Mail: Charles Darwin Foundation, Casilla 17-01-3891 Avenida 6 de Diciembre N36-109 y Pasaje California Quito, ECUADOR

Re: [R] Error Message - Error: symbol print-name too long

2005-09-26 Thread Carl Anderson
Duncan, Thank you for your help. I am pleased to say your 'very wild guess' was exactly correct. Can't believe I missed it! Carl - Original Message - From: Duncan Temple Lang [EMAIL PROTECTED] To: Carl Anderson [EMAIL PROTECTED] Cc: r-help@stat.math.ethz.ch; [EMAIL PROTECTED] Sent:

Re: [R] dates are shown as X15.Feb.03

2005-09-26 Thread Duncan Murdoch
Chris Buddenhagen wrote: Why is R recognizing dates like this? Recognizing and showing are different things. Which are you complaining about? What are you doing to cause these to be recognized/shown? Duncan Murdoch __ R-help@stat.math.ethz.ch

Re: [R] questions about boxplots

2005-09-26 Thread Stephen D. Weigand
Dear Yulei, On Sep 26, 2005, at 6:56 PM, Yulei He wrote: Hi, there. I have two questions about using R to create boxplots. 1. The function boxplot() plots the outliers. How can I label the exact values arount these outlier points? Does R have an option allow me to do that? You can use

Re: [R] figure widths in sweave

2005-09-26 Thread John Charles Considine
On Mon, 2005-09-26 at 20:34 +0800, John Charles Considine wrote: gRoovers, Can the size of figures be controlled from within a noweb document without resorting to editing the \includegraphics sections in the .tex file? yes, Sweave sets graphics widths to 0.8\textwidth by default. To