[R] create matrix

2008-03-19 Thread Felix Zajitschek - UNSW
Hi all, I have a dataset consisting of 5 columns and over 5000 rows. Each row gives information about an individual animal, including longevity, i.e. at what age an animal died. For the model I use I need to create n rows for each animal, n being its longevity, and a new column 'survival' with a

[R] Break up a data frame

2008-03-19 Thread Ravi S. Shankar
Hi R users, I have a dataframe in the below format xyz 01/03/200715.25USD xyz 01/04/200715.32USD xyz 01/02/200823.22USD abc 01/03/200745.2

Re: [R] Cygwin and Rtools

2008-03-19 Thread Prof Brian Ripley
You need Rtools and not Cygwin. In particular, the make is different, and the Cygwin one will not work. I don't know where the confusion comes from: nothing in the R documentation suggests using Cygwin. I believe that these days when Cygwin is installed it does not put itself in the Windows p

[R] basic help

2008-03-19 Thread מוטי אסולין
Hi, I am a new R user (used SPSS for many years) and I need help. I have a data frame mydata with 8 variables m2008:m2001 I wanted to add a new variable mydata$firstvalid that tells me what is the first non missing variable for each case (without using for-next). I tried many variations of this:

Re: [R] How to plot the dendrogram or tree for kmeans ?

2008-03-19 Thread Bill.Venables
Why do you think there is one? kmeans is an agglomerative clustering algorithm, not a recursively dividing one. Since there is no clustering hierarchy, so there is no dendrogram. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ng Stanley Sent: Thursday,

[R] Cointegration no constant

2008-03-19 Thread Ralph S.
Hi, I am trying to estimate a VECM without constant using the following code: data(finland) sjf <- finland sjf.reg<-ca.jo(sjf, type = c("eigen"), ecdet = c("none"), K = 2,spec=c("transitory"), season = NULL, dumvar = NULL) cajools(sjf.reg) While the cointegration test does not use a constant,

[R] How to plot the dendrogram or tree for kmeans ?

2008-03-19 Thread Ng Stanley
Hi, How to plot the dendrogram or tree for kmeans, like we do for hclust ? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-proj

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Emmanuel Levy
Dear David, Thanks a lot for pointing out kde2d, just tried it out but the problem is that it indeed takes the density of points into account, which I dont want. For example, if in an region of surface S I've got 10,000 points, and that their average height is 0.5, and in an other region I've got

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread David Winsemius
"Emmanuel Levy" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Dear Bert, > > Thanks for your reply - I indeed saw a lot of functions using: > help.search("smooth") > > The problem is that most seem to not be very appropriate to what I'd > like, or they seem extremely complicated (e.g.

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread David Winsemius
"Emmanuel Levy" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Dear Bert, > > Thanks for your reply - I indeed saw a lot of functions using: > help.search("smooth") > > The problem is that most seem to not be very appropriate to what I'd > like, or they seem extremely complicated (e.g.

Re: [R] Cygwin and Rtools

2008-03-19 Thread Duncan Murdoch
David Scott wrote: > I have just got a new machine and had a basic cygwin installed before it > was given to me. It didn't include make. Previously I have installed > Rtools to build packages and now I have got myself a bit confused as to > whether to just install make from the cygwin packages o

Re: [R] Radio Buttons or similars

2008-03-19 Thread Gabor Grothendieck
Just one other item. See: http://www.sciviews.org/_rgui/tcltk You can probably answer most of these questions yourself if you find the right example there. On Wed, Mar 19, 2008 at 9:07 PM, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Sorry, also uncomment your commented lines so its like this

Re: [R] Radio Buttons or similars

2008-03-19 Thread Gabor Grothendieck
Sorry, also uncomment your commented lines so its like this: function1<-function(){ require(tcltk) tt <- tktoplevel() rb1 <- tkradiobutton(tt) rb2 <- tkradiobutton(tt) rbValue <- tclVar("oranges") tkconfigure(rb1,variable=rbValue,value="apples") tkc

Re: [R] Radio Buttons or similars

2008-03-19 Thread Gabor Grothendieck
Use tkwait.variable(done) to wait until tcl variable done turns non zero. I've changed the lines marked ###. Also see: http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/OKCancelDialog.html function1<-function(){ require(tcltk) tt <- tktoplevel() rb1 <- tkradiobutton(tt)

Re: [R] How to remove double loop?

2008-03-19 Thread Ray Brownrigg
On Thu, 20 Mar 2008, Alberto Monteiro wrote: > Jonas Malmros wrote: > > But what if I had a matrix, where the last column was filled with > > values first (again, a for loop), and the rest was filled by using a > > double loop? > > Killing one of those loops is quite simple. The other may be > hard

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread Rolf Turner
On 20/03/2008, at 12:54 PM, David Mackovjak wrote: > I do have the values for each individual values for each cell. They > are as follows: > > N(0)N(20) > 4.48 5.76 > 4.52 5.64 > 4.635.78 > 4.70 7.01 > 4.65 7.11 > 4.57 7.02 > 5.21

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread Daniel Malter
Btw. you can plot the effect by looking at the following graph with using either Sulfur or Nitrogen as the trace or x-axis: interaction.plot(Sulfur,Nitrogen,Dependent) interaction.plot(Nitrogen,Sulfur,Dependent) Cheers, Daniel - cuncta stricte discussurus ---

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread Daniel Malter
You put all the responses into one vector and the appropriate independents Sulfur and nitrogen into the other. So your table would look like this (see below). You would test. summary(aov(Dependent~factor(Nitrogen)*factor(Sulfur))). And your output would look likt this (see further below) from whic

[R] Cygwin and Rtools

2008-03-19 Thread David Scott
I have just got a new machine and had a basic cygwin installed before it was given to me. It didn't include make. Previously I have installed Rtools to build packages and now I have got myself a bit confused as to whether to just install make from the cygwin packages or to install rtools. I wo

Re: [R] Multiple plots question

2008-03-19 Thread jim holtman
You should go through and collect the 'range' of the data that you want to plot and then use "ylim" in the "plot" to set the limits for the range. On Wed, Mar 19, 2008 at 6:20 PM, Andre Nathan <[EMAIL PROTECTED]> wrote: > Hello > > I have a number of different data sets, each loaded as a matrix. I

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread David Mackovjak
I do have the values for each individual values for each cell. They are as follows: N(0)N(20) 4.48 5.76 4.52 5.64 4.635.78 4.70 7.01 4.65 7.11 4.57 7.02 5.21 5.88 5.23 5.82 5.38 5.73 5.88 6.26

[R] Radio Buttons or similars

2008-03-19 Thread ermimi
Hello companions!!! I have a function that creates a Radio Buttons, and I need that this function return the selected value in the Radio Buttons. I would like that, if somebody know as I could return the value, you say me as do it. Next, I show the function function1<-function(){ requ

[R] Multiple plots question

2008-03-19 Thread Andre Nathan
Hello I have a number of different data sets, each loaded as a matrix. I'd like to plot them in a way that the data in the first column of each matrix is plotted on the same pair of axes. What I'm doing now is to call plot() for the data on the first matrix, then call points() for the other ones.

Re: [R] [PS] Two Way ANOVA

2008-03-19 Thread David Mackovjak
Ben, I would like to test the sulfur on the clover field, nitrogen on the clover field and then test for the presence of interaction. Sorry about the last email, seems it really screwed itself over, here it is again, hopefully nicer: Nitrogen(0) Nitrogen(20) Sulfu

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Emmanuel Levy
Dear Bert, Thanks for your reply - I indeed saw a lot of functions using: help.search("smooth") The problem is that most seem to not be very appropriate to what I'd like, or they seem extremely complicated (e.g. gma). I am probably missing something as I don't see how to use Loess. From my poor u

Re: [R] Two Way ANOVA

2008-03-19 Thread Daniel Malter
Hi, your post is hardly readable because it is so spread out over several pages. Can you repost it? Besides that I do not understand your question fully. The y is your dependent variable and as it looks the A*B would be Sulfur*Nitrogen if these are your variable names. You can also take a look

Re: [R] R GUI question

2008-03-19 Thread John Fox
Dear Jeffrey, The last issue of R News has an article on writing Rcmdr plug-in packages. Beyond the documentation that comes with it, some more information about the Rcmdr package is available at

Re: [R] betabinomial model

2008-03-19 Thread Bill.Venables
The package 'VGAM' (all caps) has a betabinomial model fitting facility in it. (I doubt this will save your soul, by the way, but it may save your butt. I think that is probably your most immediate concern, though.) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On

Re: [R] Anova of a nls object

2008-03-19 Thread Bill.Venables
You don't, because the operation is not well defined. Using anova( ) on a single linear model object will fit a sequential sequence of sub-models got by adding the terms into the linear model, as they appear in the model formula, one by one. In non-linear regression there is no unique definition

[R] Two Way ANOVA

2008-03-19 Thread David Mackovjak
First time using, the mailing list and I'm somewhat new to R, so excuse me if I do anything wrong. I was wondering how I would set up a two way ANOVA for the following data: Nitrogen (0) Nitrogen (20) (cell means)

[R] problem with optim and integrate

2008-03-19 Thread kathie
Dear all, I want to min "integrate( (p1*dnorm+p2*dnorm+p3*dnorm)^(1.3))" for p, mu, and sigma. So, I have to estimate 8 parameters(p3=1-p1-p2). Sometimes I got some results, but it was bad, sometimes, I got this warning-"Error in integrate(numint, lower = -Inf, upper = Inf) : non-finite functio

Re: [R] How to remove double loop?

2008-03-19 Thread Alberto Monteiro
Jonas Malmros wrote: > > But what if I had a matrix, where the last column was filled with > values first (again, a for loop), and the rest was filled by using a > double loop? > Killing one of those loops is quite simple. The other may be harder. > OVal <- matrix(0, n+1, n+1) > > for(i in 0:n

Re: [R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Bert Gunter
There are dozens of functions within R and contributed packages that do this. The spatial statistics packages (see the "spatial" task view on CRAN) is certainly where most are concentrated, but thin plate splines (in splines packages, I believe), tensor product splines (in mgcv package), local like

Re: [R] R GUI question

2008-03-19 Thread Richard M. Heiberger
Look at Rcmdr as the base for your additional menu functions. I am using it for my introductory courses and have added my own menu items. >From CRAN, download and install Rcmdr and read it's documentation. Also from CRAN you can download and install my addin library RcmdrPlugin.HH The latter will s

Re: [R] R GUI question

2008-03-19 Thread Gabor Csardi
On Wed, Mar 19, 2008 at 12:56:13PM -0700, jeffreya wrote: > > Hi. > > I'm looking to create a user-friendly program built around some R methods > I've written. The program should be as easy to install and use as possible > and will be built around a GUI. This program will be cross-platform; that'

[R] R GUI question

2008-03-19 Thread jeffreya
Hi. I'm looking to create a user-friendly program built around some R methods I've written. The program should be as easy to install and use as possible and will be built around a GUI. This program will be cross-platform; that's crucial. I'm familiar with Java and its GUI packages, I've been loo

[R] Smoothing z-values according to their x, y positions

2008-03-19 Thread Emmanuel Levy
Dear All, I'm sure this is not the first time this question comes up but I couldn't find the keywords that would point me out to it - so apologies if this is a re-post. Basically I've got thousands of points, each depending on three variables: x, y, and z. if I do a plot(x,y, col=z), I get somet

Re: [R] analyzing binomial data with spatially correlated errors

2008-03-19 Thread Ben Bolker
Jean-Baptiste Ferdy univ-montp2.fr> writes: > > Dear R users, > > I want to explain binomial data by a serie of fixed effects. My problem is > that my binomial data are spatially correlated. Naively, I thought I could > found something similar to gls to analyze such data. After some reading,

[R] Time Series Object

2008-03-19 Thread stephen sefick
I have a time series object that is made up of readings at 15 minutes for two years (this is why I am not posting data series). I have made this a time series with y = ts(x, frequency=96) ninety six is the number of 15minutes in a day. I want to smooth this series with k = kernel("modified.dani

Re: [R] ls() and classes

2008-03-19 Thread Henrik Bengtsson
> library(R.oo) > example(data.frame) > example(matrix) > example(iris) > ll() member data.class dimension objectSize 1 author character 1120 2 d data.frame c(10,3) 1136 3 d.0 data.framec(0,3)824 4 d0 data.frame c(10,0)320 5 d00

Re: [R] How to remove double loop?

2008-03-19 Thread Ray Brownrigg
Read the posting guide (the bit about reproducible code): > OVal <- matrix(0, n+1, n+1) > > for(i in 0:n){ + OVal[i+1, n+1] <- max(Val[i+1, n+1]-K, 0) + } Error: object "Val" not found > > for(i in seq(n,1, by=-1)){ + for(j in 0:(i-1)){ + OVal[j+1, i] <- a*((1-p)*OVal[j+1, i+1]+p*O

Re: [R] AERMOD in R?

2008-03-19 Thread Don MacQueen
I rather doubt it, but since the source code appears to be available at the link you mentioned, one could no doubt create an R function that would run AERMOD. There would be numerous issues to work out, of course. -Don At 9:44 AM -0500 3/19/08, Adrián Martínez Vargas wrote: >Dear List… > >The

Re: [R] character strings and functions

2008-03-19 Thread Rolf Turner
On 19/03/2008, at 6:14 PM, Benilton Carvalho wrote: > get("x1") Not quite the answer to the question that Erin posed. The right answer is get(x[1]) > cheers, Rolf Turner > On Mar 19, 2008, at 1:07 AM, Er

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread John Kane
?points Does this do what you wanted? - plot(tt, var2,xaxt ="n", ylim=c(min(Var[1:3]), max(Var[1:3]))) axis(1,1:length(unique(var1)), labelname) points(tt, var3, col="green") points(tt,var4, col= "red") --

Re: [R] How to get the P-values from GLM results?

2008-03-19 Thread jebyrnes
I believe you're looking for summary. So my.glm<-glm(Response ~ TrtA*TrtB) summary(my.glm) will give you p values for each parameter value. Similarly anova(my.glm) will give you p values for the likelihood ratio chi-square statistic for each factor using sequential tests. You can also use Ano

Re: [R] weibull model

2008-03-19 Thread anna freni sterrantino
the function survreg in the package "survival" should what are you looking for. Cheers Anna - Messaggio originale - Da: boshao zhang <[EMAIL PROTECTED]> A: r-help@r-project.org Inviato: Mercoledì 19 marzo 2008, 10:45:43 Oggetto: [R] weibull model Dear Helpers: If you know how to fi

[R] Spearman and Pearson correlation coefficients.

2008-03-19 Thread Marcus Vinicius
Dear all, How do I do to estimate a Spearman and Pearson correlation coefficients on 1% (5%) significance level? Thanks a lot. Best Regards. Marcus Vinicius ps: I have one matrix (60 x 13). [[alternative HTML version deleted]] __ R-help@r-proje

[R] Anova of a nls object

2008-03-19 Thread Eric Ferreira
Dear useRs, How can I perform the analysis of variance of just one nls object? Regards -- Eric B Ferreira Exact Sciences Department Federal University of Lavras Minas Gerais - Brazil [[alternative HTML version deleted]] __ R-help@r-project.

Re: [R] How to remove double loop?

2008-03-19 Thread davidr
Jonas, Take a look at CRRBinomialTreeOption{fOptions} in which Diethelm Wuertz uses a double loop, but of course, he's optimized it to use only a vector instead of a matrix! David L. Reiner, PhD Head Quant Rho Trading Securities, LLC -Original Message- From: [EMAIL PROTECTED] [mailto:[EM

Re: [R] one/multi-dimensional scaling with incomplete dissimilarity matrix

2008-03-19 Thread Justin Donaldson
Have you tried Gower dissimilarity or Sammon mapping? Gower dissimilarity is in the cluster package, under the 'daisy' method. Sammon mapping is in the MASS package, under the sammon method. You may need to redo the dissimilarity matrix with Gower/daisy first, then Sammon. Keep in mind that the

Re: [R] two cols in a data frame are the same factor

2008-03-19 Thread Michael Dewey
At 09:11 18/03/2008, Andres Legarra wrote: >Dear all, >I have a data set (QTL detection) where I have two cols of factors in >the data frame that correspond logically (in my model) to the same >factor. In fact these are haplotype classes. >Another real-life example would be family gas consumption a

[R] weibull model

2008-03-19 Thread boshao zhang
Dear Helpers: If you know how to fit a Weibull model using R, you are my savior for my project. The hazard ramda is specified as t^alpha * (1+a*dose*exp(-b*dose)). Or, can we modify the Cox model to capture the proportional part above? Here t is the survial time, dose is a subject received in a ex

[R] one/multi-dimensional scaling with incomplete dissimilarity matrix

2008-03-19 Thread Loic Thibaut
Dear David, you asked this question a while ago on the R mailing list and got no answer. I have the same problem and was wondering if you had found a solution Cheers Loic Loic Thibaut, PhD candidate, ARC Centre of Excellence for Coral Reef Studies, School of Marine Biology, James Cook Universi

Re: [R] [PS] rmultinomial() function

2008-03-19 Thread Mary Black
Thanks Ben and Eric. I've already tried rmultinom(), and there is a rmultinomial() function as well (which is in the multinomRob package). The rmultinomial() is supposed to be a random number generator for the multinomial distribution. There is an argument "long" which if set to TRUE or FALSE,

[R] Interaction Terms versus Interaction Effects in logistic regression

2008-03-19 Thread Paul Johnson
I would like to know more about the output from the terms option in predict(), especially for a glm. And especially when there is an interaction effect being considered. Here's why I ask. These articles were recently brought to my attention. They claim that just about everybody who has reported

[R] betabinomial model

2008-03-19 Thread Zaihra T
Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and if i fix it to the anova type estimate obtained from icc( in pa

[R] Fwd: betabinomial model

2008-03-19 Thread Zaihra T
--- the forwarded message follows --- --- Begin Message --- Hi, can anyone help me fit betabinomial model to the following dataset where each iD is a cluster in itself , if i use package aod 's betabinom model it gives an estimate of zero to phi(the correlation coeficient ) and i

Re: [R] adimpro package : R does not seem to find my ImageMagickinstallation

2008-03-19 Thread Olivier ETERRADOSSI
Thank you Professor, yes it is (unfortunately...), or at least it seems to be ;-) > c:\program files\imagemagick-6.3.0-q16;C:\Program Files\MiKTeX > 2.6\miktex\bin; ...8<..(snip).. Regards, Olivier Prof Brian Ripley a écrit : > On Wed, 19 Mar 2008, Olivier ETERRADOSSI wrote: > >> D

Re: [R] Using "subset" in correlation analysis

2008-03-19 Thread David Barron
You have to use the formula interface, so something like this: cor.test(~ Alt + Cab, data=adults, alternative="greater", subset=Sex=="male") David On Wed, Mar 19, 2008 at 12:59 PM, James J. Roper <[EMAIL PROTECTED]> wrote: > The correlation test function says that it can do a subset where one >

Re: [R] ROracle installation problem

2008-03-19 Thread rmail ye
Dear Prof. Ripley, I will follow your suggestion and send a follow-up message later on. Thanks, Sean On Tue, Mar 18, 2008 at 11:46 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > You need to manally configure this, *as it says*. > > In fact ROracle/inst/README.windows says > > For details

Re: [R] R CMD SHLIB errors

2008-03-19 Thread sun
oops, forgive me for the typo. "Benilton Carvalho" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-pro

Re: [R] unsubscribe

2008-03-19 Thread Gabor Csardi
What about reading the very last four lines of any email you get from the list? Like this one. G. On Wed, Mar 19, 2008 at 12:09:29PM -0400, ablukacz wrote: > Dear All, > > Can someone please give me instruction on how to unsubscribe from this > list. I do not have the original emial that arrive

[R] unsubscribe

2008-03-19 Thread ablukacz
Dear All, Can someone please give me instruction on how to unsubscribe from this list. I do not have the original emial that arrived with the subscription. Thank you, Agnes On Wed, 19 Mar 2008, Matthias Ganninger wrote: > Has anyone yet implemented or seen an implementation of a Cox (1987)

[R] analyzing binomial data with spatially correlated errors

2008-03-19 Thread Jean-Baptiste Ferdy
Dear R users, I want to explain binomial data by a serie of fixed effects. My problem is that my binomial data are spatially correlated. Naively, I thought I could found something similar to gls to analyze such data. After some reading, I decided that lmer is probably to tool I need. The model

Re: [R] adimpro package : R does not seem to find my ImageMagick installation

2008-03-19 Thread Prof Brian Ripley
On Wed, 19 Mar 2008, Olivier ETERRADOSSI wrote: > Dear list, > (sorry if I post to the wrong place...), > > Though having spent some time on it, I cannot find an answer by myself > to the following behaviour of the read.image function (adimpro package) : > I'm running R.2.6.2 on Windows XP. The ho

Re: [R] running balance down a dataframe referring back to previous row

2008-03-19 Thread David Katz
Try: cs <- with(txns,cumsum(cr - dr)) You could if needed adjust the starting value to zero by concatenating a zero in front and dropping the last entry. txns$running.bal <- c(0,cs[seq(length(cs) - 1)]) Good luck. seanpor wrote: > > Good morning, I've searched high and low and I've tried m

Re: [R] R CMD SHLIB errors

2008-03-19 Thread Benilton Carvalho
Brain indeed. On Mar 19, 2008, at 11:21 AM, sun wrote: Thanks Prof. Brain, Following your suggestion I found the reason of my problem in the document ''R Installation and Administration' and the links it points to'. After I updated to R2.6.2, the RTools's default compiler chaged to gcc4

Re: [R] R CMD SHLIB errors

2008-03-19 Thread sun
Thanks Prof. Brain, Following your suggestion I found the reason of my problem in the document ''R Installation and Administration' and the links it points to'. After I updated to R2.6.2, the RTools's default compiler chaged to gcc4 while I was using 3.4.x. The error disappeared after I inst

[R] adimpro package : R does not seem to find my ImageMagick installation

2008-03-19 Thread Olivier ETERRADOSSI
Dear list, (sorry if I post to the wrong place...), Though having spent some time on it, I cannot find an answer by myself to the following behaviour of the read.image function (adimpro package) : I'm running R.2.6.2 on Windows XP. The home directory is C:\Program files\R\R-2.6.2 Version 0.4.4 o

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Diego Culattoni
Thank you very much! What I would like to have at the end a cols <- c(1,2,3,4), so cols = 1 if var3=0 and var4=1 cols = 2 and pchs=1 if var3=0 and var4=1 cols = 3 if var3=0 and var4=2 cols = 4 and pchs=1 if var3=0 and var4=2 Can this be down similarly? Thanks in advance, Diego - Origi

[R] Cox Controlled Rounding Algorithm

2008-03-19 Thread Matthias Ganninger
Has anyone yet implemented or seen an implementation of a Cox (1987) controlled rounding algorithm in R? The controlled rounding procedure is described in: Cox, L.H. (1987): A Constructive Procedure for Unbiased Controlled Rounding. JASA, Vol. 82, No. 398, pp. 520-524. Kind regards Matthias Ga

[R] Finding Maximums in a sliding window time series

2008-03-19 Thread Jamie Ledingham
Dear all, I am having some problems with the folowing task and would appreciate any thoughts on the matter. I have a sliding window time series of rainfall. This is 24 hour window created from an hourly record. Every hour, a new twenty four hour total is calculated. I would like to extract the

[R] Luis Miguel Delgado Gomez/BBK está ausente d e la oficina.

2008-03-19 Thread ldelgado
Estaré ausente de la oficina desde el 18/03/2008 y no volveré hasta el 31/03/2008. Responderé a su mensaje cuando regrese. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] Odp: plot with diffrent colour and plotting symbols

2008-03-19 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 19.03.2008 14:18:39: > Dear mailing list members, > > I am a new R user, I would like to plot the follewing data > > var1 <- c(1,2,1,1,2,1,2,1,2,2) > var2 <- round(rgamma(10,2,1)/0.1)*0.1 > var3 <- c(0,1,0,1,0,0,0,0,1,0) > var4 <- c(1,2,2,2,1,1,1,1,1,1) > > Var

Re: [R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Henrique Dallazuanna
Perhaps: cols <- colors()[1:length(unique(apply(Var[3:4], 1, paste, collapse="")))*50] plot(tt, var2, type='p', col=cols, pch=16) On 19/03/2008, Diego Culattoni <[EMAIL PROTECTED]> wrote: > Dear mailing list members, > > I am a new R user, I would like to plot the follewing data > > var1 <- c(1

Re: [R] ls() and classes

2008-03-19 Thread David Winsemius
Rolf Turner <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > > On 19/03/2008, at 4:39 PM, Erin Hodgess wrote: > >> Dear R People: >> >> I want to get the class of all of the objects in my directory. >> > > Too easy!!! > > sapply(ls(),function(x){class(get(x))}) > Thank you, Rolf. Th

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects wi

2008-03-19 Thread Duncan Murdoch
On 3/19/2008 10:18 AM, (Ted Harding) wrote: > On 19-Mar-08 10:34:12, Rory Winston wrote: >> Me too. Getting directly spammed like this is really annoying. >> I dont mind a general post to the list, but individually >> spamming each member of the list is unacceptable. Especially >> as I have no inte

Re: [R] [PS] rmultinomial() function

2008-03-19 Thread Ben Fairbank
Mary -- The dmultinomial function (try ?Multinomial, noting that it is an upper case M) has a "log" option, which, if set to TRUE, returns logarithms of probabilities, but that is for computing probabilities, not generating samples. Perhaps the "long" you referred to is a misprint for "log?" In

Re: [R] ask for help how to get accumulate contingency table?

2008-03-19 Thread alex chin
I am still looking for an efficient way to get accumulated contingency table. Becasue it is huge data and permutate with covariate. it will be very slow if I use loops. Can somebody give me a help? Thanks. xj> Date: Tue, 18 Mar 2008 10:43:27 -0400> From: [EMAIL PROTECTED]> Subject: RE:

[R] plot with diffrent colour and plotting symbols

2008-03-19 Thread Diego Culattoni
Dear mailing list members, I am a new R user, I would like to plot the follewing data var1 <- c(1,2,1,1,2,1,2,1,2,2) var2 <- round(rgamma(10,2,1)/0.1)*0.1 var3 <- c(0,1,0,1,0,0,0,0,1,0) var4 <- c(1,2,2,2,1,1,1,1,1,1) Var <- data.frame(var1,var2,var3,var4) Var <- Var[sort(Var$var1),] tt <- Var$va

[R] Error en nlm(logdgenexpn, p = c(vmomest[[1]], vmomest[[2]]), x = x.genexp, : valor no finito provisto por 'nlm'

2008-03-19 Thread bernardo lagos alvarez
Dear useRs, I am analysing the behaviour of MLE for the two parameters of a kind of exponential distribution, leaving as initial values the estimators moments produced by the variation coefficient. I do using simulations, giving them an accountant, r. But running my codes remains a problem with

[R] How to remove double loop?

2008-03-19 Thread Jonas Malmros
Bill, Alberto, Gabor, Thank you for answering my question. Now I learned about outer() function. That was a straightforward example. But what if I had a matrix, where the last column was filled with values first (again, a for loop), and the rest was filled by using a double loop? OVal <- matrix(0

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects wi

2008-03-19 Thread Ted Harding
On 19-Mar-08 10:34:12, Rory Winston wrote: > Me too. Getting directly spammed like this is really annoying. > I dont mind a general post to the list, but individually > spamming each member of the list is unacceptable. Especially > as I have no interest in the stupid product in question. It's not

Re: [R] Using "subset" in correlation analysis

2008-03-19 Thread Mark Lyman
James J. Roper gmail.com> writes: > > The correlation test function says that it can do a subset where one > specifies the subsete vector. I cannot seem to get it to work. > > For example, the command line is: > > cor.test(adults$Alt, adults$Cab, alternative="greater", method="pearson") > >

Re: [R] Partition data into clusters

2008-03-19 Thread John Kane
Can you supply a small self-contained example of this? --- Suhaila Zainudin <[EMAIL PROTECTED]> wrote: > Greetings R-users, > > I have been using the fpc package in R to cluster my > data. Speficically I am > using kmeansruns clustering. > I would like to know how I use R to partition data > into

[R] AERMOD in R?

2008-03-19 Thread Adrián Martínez Vargas
Dear List… There are pakages similar to AERMOD Modeling System* in R? *http://www.epa.gov/scram001/dispersion_prefrec.htm#aermod Best regards Dr. Adrian Martínez Vargas Revista Minería y Geología (Editor Principal) ISMM, Las Coloradas, s/n Moa, Holguín, Cuba CP. 83329 http://www.ism

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Werner Wernersen
I am not aware of that I have ever used R2HTML. However, your suggestion worked! Using Sweave("test.Rnw", syntax="SweaveSyntaxNoweb") does the trick and now the \Sexpr{} tags are being parsed again. Many, many thanks Max! All the best, Werner --- Max Kuhn <[EMAIL PROTECTED]> schrieb: > Have

Re: [R] list()

2008-03-19 Thread John Kane
I cannot remember seeing any specific tutorial on the use of list(). There are bits and pieces here and there but outside of the little bit in the Intro to R I cannot think of any. For your specific question about names you can always assign (new) names to a list # Examples # No name aa <- list

Re: [R] list()

2008-03-19 Thread Erik Iverson
Scott - Not sure about online references, I'm sure there are some. But any R book should have a complete discussion of lists. I learned from Modern Applied Statistics with S (MASS). Under the "Books" section of www.r-project.org, you'll find a comprehensive list of books dealing with R, incl

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects with Microsoft Office for free

2008-03-19 Thread ahimsa campos-arceiz
The guys didn't need to work very hard to obtain our data. (My understanding is that) all the mails from this list are publicly available at the R-help archives. You will find yourself here: http://tolstoy.newcastle.edu.au/R/e4/help/08/03/index.html That is why we can (and must) browse through th

[R] Using "subset" in correlation analysis

2008-03-19 Thread James J. Roper
The correlation test function says that it can do a subset where one specifies the subsete vector. I cannot seem to get it to work. For example, the command line is: cor.test(adults$Alt, adults$Cab, alternative="greater", method="pearson") So, let´s say my subset vector is "Sex". How would I

Re: [R] Sweave does not parse \Sexpr{}

2008-03-19 Thread Max Kuhn
Have you used R2HTML lately? If so, please see the Sweave FAQ http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html#x1-18000A.16 Max On Wed, Mar 19, 2008 at 7:15 AM, Werner Wernersen <[EMAIL PROTECTED]> wrote: > Sorry about the lack of detail. > > Some facts: > - code chunks are processed fine

Re: [R] How to remove double for loop?

2008-03-19 Thread Gabor Grothendieck
Try this: V <- diag(n+1); i <- row(V) - 1; j <- col(V) - 1 (j > i) * u ^ i * d ^ (j - i) On Wed, Mar 19, 2008 at 7:24 AM, Jonas Malmros <[EMAIL PROTECTED]> wrote: > Hello everyone. > > I use double for loops to fill in matrices, but there are surely > better (and computationally faster) ways to p

Re: [R] How to remove double for loop?

2008-03-19 Thread Alberto Monteiro
Jonas Malmros wrote: > > I use double for loops to fill in matrices, but there are surely > better (and computationally faster) ways to perform that task. > Could someone show me, given the following example of a double for > loop, how this could be done? It is much easier to learn by examples. >

Re: [R] How to remove double for loop?

2008-03-19 Thread Bill.Venables
One possibility might be Val <- outer(0:n, 0:n, function(i, j) ifelse(i <= j, u^i*d^(j-i), 0)) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonas Malmros Sent: Wednesday, 19 March 2008 9:24 PM To: r-help@r-project.org Subject: [R] How to remove double

Re: [R] ROC analysis

2008-03-19 Thread Frank E Harrell Jr
Eleni Christodoulou wrote: > Richard, thanks, I think it will work. I will calculate the cutoff value > and then, from the prediction object, find the fpr that is related to it and > put it as argument to performance. I will keep you informed. > > Eleni You will probably need to bootstrap the en

[R] How to remove double for loop?

2008-03-19 Thread Jonas Malmros
Hello everyone. I use double for loops to fill in matrices, but there are surely better (and computationally faster) ways to perform that task. Could someone show me, given the following example of a double for loop, how this could be done? It is much easier to learn by examples. Val <- matrix(0,

[R] Table for clustering dendrogram

2008-03-19 Thread yvo
Dear all, I am using the hclust method in R. I am building nice dendrograms with it. Actually for my further analysis I want to get the number of bifurcations (bif) for each object (labels) in the dendrogram. That has to be calculated by the colums merge, height and order. http://www.nabble.com/

Re: [R] Error when producing multiple graphes

2008-03-19 Thread Uli Kleinwechter
I just solved the problem. The error happened because of the empty variables in the dataframe. In any case, thanks for caring. bartjoosen schrieb: > Could you provide us some working codo, so that we can reproduce the error > and see what went wrong? > > > Uli Kleinwechter wrote: > >> Dear

Re: [R] UNSOLITED E_MAILS: Integrate R data-analysis projects with Microsoft Office for free

2008-03-19 Thread Rory Winston
Me too. Getting directly spammed like this is really annoying. I dont mind a general post to the list, but individually spamming each member of the list is unacceptable. Especially as I have no interest in the stupid product in question. Gorden T Jemwa wrote: > > Dear R Admins, > > I received

  1   2   >