[R] questions about axis

2003-10-22 Thread yyh
Dear helper. I am a beginer. I have difficulties to handle axis. I want to draw axis label such that axis has range of [-0.4,0.4] with intervel 0.2 for x and y axis. Some part of range do not have data points. Thus, plot does not show whole range. How can I enforce plot to depict the whole

Re: [R] questions about axis

2003-10-22 Thread Ko-Kang Kevin Wang
Hi, On Wed, 22 Oct 2003, yyh wrote: I have difficulties to handle axis. I want to draw axis label such that axis has range of [-0.4,0.4] with intervel 0.2 for x and y axis. Some part of range do not have data points. Thus, plot does not show whole range. How can I enforce plot to depict

Re: [R] run R under linux

2003-10-22 Thread Zhen Pang
Thank you for your help. But try() seems to only allow for an expression. My simulation have serveral expressions which possibly have problem. Is there any possibility to include them all in the try()? If not, I seem to use several try(). From: Jason Turner [EMAIL PROTECTED] To: Zhen Pang

[R] Automatically updating GLM object

2003-10-22 Thread LE TERTRE Alain
Dear all, i generated several GLM objects, named myobject1 to myobject25. Now i'd like to update both of them. So i tried: for(ii in 1:25) { assign(paste(myobject.updated, ii, sep=), update( myobject[ii] ,.~ + VAR2)) } Doesn't work I also tried to get all the names in a vector and

Re: [R] run R under linux

2003-10-22 Thread Prof Brian D Ripley
On Wed, 22 Oct 2003, Zhen Pang wrote: Thank you for your help. But try() seems to only allow for an expression. My simulation have serveral expressions which possibly have problem. Is there any possibility to include them all in the try()? If not, I seem to use several try(). {line1 line2

Re: [R] Graphics overview

2003-10-22 Thread Christoph Bier
Christoph Bier schrieb: [...] Yes, it is, thanks! But it seems only to work with arrays as No, it also works with data.frames as help(colSums) told me. -- Christoph Bier, Dipl.Oecotroph., Email: [EMAIL PROTECTED] Universitaet Kassel, FG Oekologische Lebensmittelqualitaet und Ernaehrungskultur

Re: [R] Automatically updating GLM object

2003-10-22 Thread Prof Brian Ripley
What does Doesn't work mean here? Note that myobject[ii] is unlikely to be what you want, and perhaps it should be get(paste(myobject, ii, sep=)) but the error messages you surely got should have been informative. On Wed, 22 Oct 2003, LE TERTRE Alain wrote: Dear all, i

RE : [R] Automatically updating GLM object

2003-10-22 Thread LE TERTRE Alain
Sure that doesn't work is not very informative. The error message is Error in update.default(mod.init, new.form, data = mydata, na.action = na.omit) : need an object with call component That's because he's looking at a character object (the name) and not at the object itself. But your

[R]: Prediction interval for a Gaussian family log-link model

2003-10-22 Thread Wayne Jones
Hi there fellow R-users, Can anyone tell me how to build a prediction interval for a gaussian log-link model for the reponse variable?? I can find the standard error of the predictions but I cant seem to find the prediction interval. Is there a way I can calculate the prediction interval from

[R] Indicator Kriging

2003-10-22 Thread Edzer J. Pebesma
Indicator kriging is nothing but ordinary or simple kriging on binary (0/1) data; there's quite a list of packages that can do kriging: gstat, geoR, sgeostat, fields, spatial, ... Be aware that indicator kriging outcomes only estimate probabilities and may lie outside [0,1] To my knowledge there's

[R] RSPerl on Windows

2003-10-22 Thread Dowle, Matthew [EQRE]
Dear All, RSPerl looks like a great package. Does anyone have it working on Windows? I have seen references to problems building it on Windows, and suggestions to use R(D)COM instead, therefore I was wondering what the current state of play is. Many thanks, Matthew

[R] plotmath question: y'

2003-10-22 Thread Pascal A. Niklaus
Hi all, I wonder how to correctly write the following expression (it's the axis label in a plot command): ylab=expression(y' == y - bar(y) ) Somehow the single quote in y' is causing the problems, I guess because it is interpreted as a quote... Does it have to be escaped? But how? Thanks

[R] non linear regression with R

2003-10-22 Thread Sophie Gerber
Dear Colleagues, I have x, y data (pollen and seed dispersal from oaks !) that I would like to fit with a function which look like this: p(a,b,x,y)=b/(2*pi*a²gamma(2/b))*exp(-(square_root(x²+y²)/a)power(b)) I am looking for a and b values that fit my data at best. Can someone give me hints to

Re: [R]: Prediction interval for a Gaussian family log-link model

2003-10-22 Thread Peter Dalgaard
Wayne Jones [EMAIL PROTECTED] writes: Hi there fellow R-users, Can anyone tell me how to build a prediction interval for a gaussian log-link model for the reponse variable?? I can find the standard error of the predictions but I cant seem to find the prediction interval. Is there a way I

Re: [R] plotmath question: y'

2003-10-22 Thread Uwe Ligges
Pascal A. Niklaus wrote: Hi all, I wonder how to correctly write the following expression (it's the axis label in a plot command): ylab=expression(y' == y - bar(y) ) expression(y * ' == y - bar(y)) Uwe Ligges Somehow the single quote in y' is causing the problems, I guess because it

Re: [R] plotmath question: y'

2003-10-22 Thread Peter Dalgaard
Pascal A. Niklaus [EMAIL PROTECTED] writes: Hi all, I wonder how to correctly write the following expression (it's the axis label in a plot command): ylab=expression(y' == y - bar(y) ) Somehow the single quote in y' is causing the problems, I guess because it is interpreted as a

RE: [R] select text using only the keyboard

2003-10-22 Thread Simon Fear
I have a different wish: I want to be able to mouseclick in the middle of a line to get the cursor there (as in SPlus). While I appreciate that to get my wish I should just write a little patch, I estimate it would take me about 2 years to reach the point where I was capable of it, assuming I

[R] adjacency matrix

2003-10-22 Thread Orlando Zacarias
Dear R experts, I am new to the list and R software. I need to convert arcview file to Winbugs having R has middle package. Got from friends that it is possible following the steps: 1. Converting arcview shapefile to cgm clear text file 2. Downloading convert.r to into R 2.1 use

RE: [R] aliases for R constructs?

2003-10-22 Thread Simon Fear
Some related suggestions: 1. instead of dataFrame[condition, ], use subset() which has an inbuilt test for !is.na(condition). This function is not documented in the Introduction or cross-referenced by ?[, so should be posted to this list at least once a week until everybody knows about

[R] Help with STL function in R compared to S-Plus

2003-10-22 Thread Andrew White
I am trying to understand the nuances of STL (seasonal trend decomposition with loess) based on William Cleveland's (and others?) original development. I do not understand the specification or use of frequency components or equivalent low-pass filter components in the stl() function. I have

Re: [R] non linear regression with R

2003-10-22 Thread Spencer Graves
Have you considered nls or optim? My way of handling this kind of problem is to assume that x and / or y follow some probability distribution with parameters a and b. Then I write a function to compute deviance = (-2*log(likelihood)) = (-2*log(probability density for x and / or y

Re: [R] non linear regression with R

2003-10-22 Thread Ben Bolker
Your function is not quite complete -- you need to specify an error distribution such as Poisson or negative binomial (see literature from the past decade by J. Clark, Muller-Landau, Ribbens and others) Assuming Poisson errors, if x and y are locations and d is observed density: f -

[R] Latex and R

2003-10-22 Thread Salvatore Barbaro
Hi all! Is there a possibility to read Latex-formulas directly into R, e.g. to read c=\frac{a}{b} such that R knows that c- a/b is meant? I wish to generate some numerical examples of a theoretical model with R (and also to generate some plots) and I find it exhausting to translate my model

Re: [R] aliases for R constructs?

2003-10-22 Thread Patrick Burns
Simon Fear wrote: 3. I have a very old brown-covered book describing macros in the S language (version 1? I don't have it to hand to check). When and why did they disappear? (Hoping John Chambers is reading this.) Pretty much the same reason that you don't grind your flour by hand with a

Re: [R] Help with STL function in R compared to S-Plus

2003-10-22 Thread Prof Brian Ripley
On Wed, 22 Oct 2003, Andrew White wrote: I am trying to understand the nuances of STL (seasonal trend decomposition with loess) based on William Cleveland's (and others?) original development. I do not understand the specification or use of frequency components or equivalent low-pass

[R] High frequency time-series

2003-10-22 Thread [EMAIL PROTECTED]
Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a set date. Leafing through r-help mail archives I've found this

Re: [R] adjacency matrix

2003-10-22 Thread Roger Bivand
On Wed, 22 Oct 2003, Orlando Zacarias wrote: Dear R experts, I am new to the list and R software. I need to convert arcview file to Winbugs having R has middle package. Got from friends that it is possible following the steps: 1. Converting arcview shapefile to cgm clear text file 2.

Re: [R] Patches for DBI/RMySQL valueClass problem?

2003-10-22 Thread David James
Hi, I think yesterday's email from M.Kondrin's [EMAIL PROTECTED] summarizes two alternatives (1 and 2 below); of course you can also use R-1.7.1. To recap, I think you have 3 easy choices (at least): (1) install R-patched from ftp://ftp.stat.math.ethz.ch/Software/R/R-patched.tar.gz

RE: [R] adjacency matrix

2003-10-22 Thread Christophe Declercq
Your question is not really clear because: - I don't know what 'convert.r' do - I don't know where 'transf.cgm' is (BTW, 'cgm' is not the usual extension for shapefiles which is 'shp'). Check if it is really in your current directory. but, yes, if what you want is to import shapefiles in R, it's

Re: [R] Excel to R

2003-10-22 Thread Duncan Temple Lang
Indeed, keeping the computations in R and working directly with the Excel view of the cells is desirable for generality. It minimizes the loss in information from translating to simpler forms such as CSV, strings, etc. From within R on Windows, one can use DCOM to create an Excel application,

[R] 0-only-rows in correspondence analysis

2003-10-22 Thread Martin Wegmann
Hello, I am looking for a workaround of species empty plots in a correspondence analysis. I tried to do a community structure analysis with a ca via decorana(), ca() and CAIV(), but none of them allow 0 only-rows. I have species (abs./pres) in columns and sites in rows sp1 sp1 sp3

Re: [R] aliases for R constructs?

2003-10-22 Thread Thomas Lumley
On Wed, 22 Oct 2003, Patrick Burns wrote: Simon Fear wrote: 3. I have a very old brown-covered book describing macros in the S language (version 1? I don't have it to hand to check). When and why did they disappear? (Hoping John Chambers is reading this.) Pretty much the same

Re: [R] Patches for DBI/RMySQL valueClass problem?

2003-10-22 Thread Barnet Wagman
Thank you. The copy of M.Kondrin's email that I received was truncated, so I don't know what he suggested. This should get me going. Regards, Barnet Wagman David James wrote: Hi, I think yesterday's email from M.Kondrin's [EMAIL PROTECTED] summarizes two alternatives (1 and 2 below); of

RE: [R] High frequency time-series

2003-10-22 Thread Heywood, Giles
You may find the irregular time-series (its) package on CRAN helpful. If your raw data were in a csv file thus: x april 26 2002 15:00:00 1.1 april 26 2002 15:15:00 1.2 april 26 2002 15:30:00 1.3 april 26 2002 15:45:00 1.4 Then you could read it in thus:

Re: [R] High frequency time-series

2003-10-22 Thread Achim Zeileis
On Wednesday 22 October 2003 15:09, [EMAIL PROTECTED] wrote: Having to collect hourly electricity loads and quarter-of-an-hour electricity production data for some years I think that the tidiest way of doing it is to resort to ts but I don't know how to define such a frequency starting from a

Re: [R] 0-only-rows in correspondence analysis

2003-10-22 Thread Stephane DRAY
CA is based on relative composition and not on absolute value. So, empty site do not give any information. In a computational point of view, empty row or column do not allow to compute row / col weights. that is why most function do not work with empty row or column. dudi.coa (ade4 package)

[R] comments and Sweave

2003-10-22 Thread Giovanni Petris
I am using Sweave to produce handouts for teaching. Is there a way of making Sweave keep the comments following the `#' in the code chuncks? Thanks, Giovanni -- __ [ ] [ Giovanni Petris

[R] Weighted Clustering

2003-10-22 Thread vishal goyal
Hi, I have a data set(say 2-d demands of a product (say flow-rate vs concentration)) and with each demand is the weightage (like a probability) of that demand occuring. Is there a way to cluster this demand-data (deterministic or probabilistic(if possible)) which also incorporates the weights

[R] Scheme and R

2003-10-22 Thread Arend P. van der Veen
I have been using a product called rpy to allow me to access R from Python. I was wondering if anybody know if a similar product for Scheme. Thanks, Arend __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

[R] output in a list

2003-10-22 Thread javier garcia - CEBAS
Hello. I've got a very short question. I've got a vector with about 800 numbers; and I would like to put them in a file, but I need them to be written just one value in each row. Is this possible? Best regards Javier __ [EMAIL PROTECTED] mailing

Re: [R] output in a list

2003-10-22 Thread Douglas Bates
javier garcia - CEBAS [EMAIL PROTECTED] writes: I've got a very short question. I've got a vector with about 800 numbers; and I would like to put them in a file, but I need them to be written just one value in each row. Is this possible? write(myvec, file = 'myfile.txt', ncol = 1)

[R] INDEX file building packages?

2003-10-22 Thread Eryk Wolski
Hi! Have build a package. I do not create by myself an INDEX file. If I got it right it is optional. If no INDEX are there it is created during the installation process.(So I understand the manual.) I call R CMD INSTALL mytest .. But no INDEX file are generated. Hence no function list are

Re: [R] output in a list

2003-10-22 Thread Prof Brian Ripley
On Wed, 22 Oct 2003, javier garcia - CEBAS wrote: Hello. I've got a very short question. I've got a vector with about 800 numbers; and I would like to put them in a file, but I need them to be written just one value in each row. Is this possible? Yes. ?write tells you one way. --

[R] providing a variable as a parameter in a function

2003-10-22 Thread Subramanian Karthikeyan
From a data frame, how do we extract a specific column name, and plug that into a command (eg. for Anova as shown below) df = read.delim(mydata.txt) y = colnames(df) r = ncol(x) Lets say that in the data frame column 1 contains treatments, column 2 contains doses, and columns 3, 4, 5 etc. are

[R] passing a variable (containing the value of the argument) to a function

2003-10-22 Thread Subramanian Karthikeyan
My previous question put in a simpler way: How would I pass a value of a variable to a function such as lm(Effect1~Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum))? Here, 'Effect' is a column name in my data matrix, and I want Effect1 to be replaced by Effect2 and so on

Re: [R] comments and Sweave

2003-10-22 Thread Ko-Kang Kevin Wang
Hi, I asked exactly the same question to the author of Sweave privately last week. Friedrich's reply was that it is not possible at the moment, as R parser discard the comments. But he's working on it ;-D On Wed, 22 Oct 2003, Giovanni Petris wrote: Date: Wed, 22 Oct 2003 10:59:38 -0500

Re: [R] INDEX file building packages?

2003-10-22 Thread Roger Bivand
On Wed, 22 Oct 2003, Eryk Wolski wrote: Hi! Have build a package. I do not create by myself an INDEX file. If I got it right it is optional. If no INDEX are there it is created during the installation process.(So I understand the manual.) I call R CMD INSTALL mytest .. But no INDEX file

Re: [R] providing a variable as a parameter in a function

2003-10-22 Thread John Fox
Dear Subramanian, How about this: for (y in df[, 3:5]) { mod = lm(y ~ Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum)) Anova(mod, type = III) } Does that give you what you want? John At 01:31 PM 10/22/2003

Re: [R] select text using only the keyboard

2003-10-22 Thread Jason Turner
Simon Fear wrote: I have a different wish: I want to be able to mouseclick in the middle of a line to get the cursor there (as in SPlus). While I appreciate that to get my wish I should just write a little patch, I estimate it would take me about 2 years to reach the point where I was capable of

[R] How to reformat data from database into data.frame?

2003-10-22 Thread Mark Dalphin
I'm trying to find a clever way to re-map data from a database query into a data.frame. Querying a database often returns a table (data.frame) like this: GeneID MethodID Value 61 123 62 456 63 987 71 234 73

Re: [R] providing a variable as a parameter in a function

2003-10-22 Thread Subramanian Karthikeyan
Thanks John, Your solution worked.. After i posted my message I tried sth else which also worked... I tried this: for (i in 3:cnum) { fla = as.formula(paste((cnom[i],~,Trt*Dose)) mod = lm(fla, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum)) an = Anova(mod,type

Re: [R] passing a variable (containing the value of the argument) to a function

2003-10-22 Thread Peter Dalgaard
Subramanian Karthikeyan [EMAIL PROTECTED] writes: My previous question put in a simpler way: How would I pass a value of a variable to a function such as lm(Effect1~Trt*Dose, data = x, contrasts = list(Trt = contr.sum, Dose = contr.sum))? Here, 'Effect' is a column name in my data

Re: [R] select text using only the keyboard

2003-10-22 Thread Peter Dalgaard
Simon Fear [EMAIL PROTECTED] writes: While I appreciate that to get my wish I should just write a little patch, I estimate it would take me about 2 years to reach the point where I was capable of it, assuming I did nothing else, and I would certainly have to understand Windows, which in

RE: [R] How to reformat data from database into data.frame?

2003-10-22 Thread Gabor Grothendieck
Assuming your input data frame is genes: reshape(genes,idvar=GeneID,timevar=MethodID,direction=wide) --- On Wed 10/22, Mark Dalphin [EMAIL PROTECTED] wrote: From: Mark Dalphin [mailto: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Date: Wed, 22 Oct 2003 12:05:44 -0700 Subject: [R] How to

Re: [R] passing a variable (containing the value of the argument) to a function

2003-10-22 Thread Spencer Graves
Hi, Peter: How does that compare with the following: for (myname in names(myframe)[1:4]){ mdl - formula(paste(myname, ~ etc.etc)) myfit - lm(mdl, data=myframe) print(summary(myfit)) } Or: for (myname in names(myframe)[1:4]){ lm.txt - paste(lm(, myname, ~ etc.etc, data=myframe))

Re: [R] passing a variable (containing the value of the argument) to a function

2003-10-22 Thread Peter Dalgaard
Spencer Graves [EMAIL PROTECTED] writes: Hi, Peter: How does that compare with the following: for (myname in names(myframe)[1:4]){ mdl - formula(paste(myname, ~ etc.etc)) myfit - lm(mdl, data=myframe) print(summary(myfit)) } Or: for (myname in names(myframe)[1:4]){

Re: [R] passing a variable (containing the value of the argument) to a function

2003-10-22 Thread Spencer Graves
Hi, Peter: I'll have to study your example and alternatives. spencer graves Peter Dalgaard wrote: Spencer Graves [EMAIL PROTECTED] writes: Hi, Peter: How does that compare with the following: for (myname in names(myframe)[1:4]){ mdl - formula(paste(myname, ~ etc.etc)) myfit -

[R] 2 D non-parametric density estimation

2003-10-22 Thread John Fieberg
I have spatial data in 2 dimensions - say (x,y). The correlation between x and y is fairly substantial. My goal is to use a non-parametric approach to estimate the multivariate density describing the spatial locations. Ultimately, I would like to use this estimated density to determine the area

Re: [R] 2 D non-parametric density estimation

2003-10-22 Thread Thomas W Blackwell
John - My recollection is that Adrian Raftery's contributed package 'mclust' does kernel density estimation as well. Not sure whether it does what you need. Take a look at it on CRAN. Ah..I see that the description which shows up on Jon Baron's search page is not encouraging. Give it a try,