[R] Takagi-Sugeno fuzzy model

2008-02-23 Thread Muhammad Subianto
Dear R-help. I am learning fuzzy algorithm, at this moment about Takagi-Sugeno fuzzy model. I have been searching on mailing list r-help about this, but I didn't find any list about Takagi-Sugeno fuzzy model. I want to know, are there any R code (or library/package) for Takagi-Sugeno fuzzy model.

Re: [R] fitting a lognormal distribution using cumulative probabilities

2008-02-23 Thread ahimsa campos-arceiz
Dear Prof Ripley and Dimitris (cc R-list), thank you very much for your very insightful responses. I've been checking how to use survreg{survival} to fit a left-censored lognormal distribution, and I was surprised to find that results are exactly the same as with fitdistr{MASS}. Here is an

Re: [R] fitting a lognormal distribution using cumulative probabilities

2008-02-23 Thread Prof Brian Ripley
Your example code is asserting that the events occurred at the times in 'obs.time', not before those times. Surv(event = 1) means uncensored. If you try event = 0, the fitter diverges towards an exact fit, as I said it should. Yes, you will get a good fit to the ECDF, but you are modelling

[R] Newbie: Measuring distance between clusters.

2008-02-23 Thread Keizer_71
Hi, I had 1 genes, and I clustered them using K-means clustering in R. kc-kmeans(data.sub,7) kc n cluster sum of squares by cluster: [1] 60631.76 135886.19 159049.71 101783.27 90040.72 183335.60 158867.81 Available components: [1] cluster centers withinss size I am very new to R. How

Re: [R] fitting a lognormal distribution using cumulative probabilities

2008-02-23 Thread ahimsa campos-arceiz
Dear Professor Ripley, thanks again for your mail and useful comments. Surv(event = 1) means uncensored. If you try event = 0, the fitter diverges towards an exact fit, as I said it should. Sorry, I misunderstood this. (BTW, using a .com address suggests you are a COMpany and in the absence

[R] Hiding a function

2008-02-23 Thread Christophe Genolini
Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I declare them in the big function : -- a - function(x){ b - function(y){y^2} d - function(y){y^3} b(x)+d(x)+2 } a(2)

Re: [R] addtable2plot(plotrix)

2008-02-23 Thread Jim Lemon
Markus Didion wrote: Dear List adding a table to a plot using addtable2plot(plotrix) does not seem to work when using a logarithmic axis. The table is then reduced to one line. Is there an argument to indicate that a log-scale is used, or an alternative to add a bunch of information to

Re: [R] Hiding a function

2008-02-23 Thread Duncan Murdoch
On 23/02/2008 5:15 AM, Christophe Genolini wrote: Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I declare them in the big function : -- a - function(x){ b -

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
Duncan Murdoch a écrit : On 23/02/2008 5:15 AM, Christophe Genolini wrote: Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I declare them in the big function : --

[R] Set without argument

2008-02-23 Thread Christophe Genolini
Hi the list, I am defining S4 objet. Is it possbile to define a method that change the slot of an object without using - ? My object contain a numeric and a matrix. At some point, I would like to impute the missing value in the matrix. So I would like to use something like : -

Re: [R] Hiding a function

2008-02-23 Thread Duncan Murdoch
On 23/02/2008 5:58 AM, Christophe Genolini wrote: Duncan Murdoch a écrit : On 23/02/2008 5:15 AM, Christophe Genolini wrote: Hi the list Is it possible to 'hide' a function from the user ? I cut a big fonction in sub function and I would like to hide the sub function, just like if I

Re: [R] using subset() in data frame

2008-02-23 Thread Chuck Cleland
On 2/22/2008 8:01 PM, Robert Walters wrote: R folks, As an R novice, I struggle with the mystery of subsetting. Textbook and online examples of this seem quite straightforward yet I cannot get my mind around it. For practice, I'm using the code in MASS Ch. 6, whiteside data to analyze a

Re: [R] Hiding a function

2008-02-23 Thread Gabor Csardi
It depends what you mean by 'hiding', you can start the function names with a dot and then they are not listed by ls(), so this is kind of hiding. .a - function() TRUE ls() character(0) .a function() TRUE Personally i would not do this though. G. On Sat, Feb 23, 2008 at 11:58:57AM +0100,

Re: [R] using subset() in data frame

2008-02-23 Thread Chuck Cleland
On 2/23/2008 6:09 AM, Chuck Cleland wrote: On 2/22/2008 8:01 PM, Robert Walters wrote: R folks, As an R novice, I struggle with the mystery of subsetting. Textbook and online examples of this seem quite straightforward yet I cannot get my mind around it. For practice, I'm using the code in

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
Gabor Csardi a écrit : It depends what you mean by 'hiding', Well, the main idea was the to limit the existance of a function. a( ) need b( ) but no other function will need b(). So I would have like to let b( ) exists localy only when a( ) is called, not elsewhere. Christophe you can start

Re: [R] Hiding a function

2008-02-23 Thread Gabor Grothendieck
Just to clarify, what Duncan was referring to as the alternative was nesting the definition of one function in another, e.g. look at FUNx in by.data.frame -- FUNx is available to by.data.frame but is not visible outside of by.data.frame . On Sat, Feb 23, 2008 at 6:09 AM, Duncan Murdoch [EMAIL

Re: [R] Set without argument

2008-02-23 Thread Martin Morgan
Christophe Genolini [EMAIL PROTECTED] writes: Hi the list, I am defining S4 objet. Is it possbile to define a method that change the slot of an object without using - ? My object contain a numeric and a matrix. At some point, I would like to impute the missing value in the matrix. So I

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
Ok, I saw FUNx So, I reformulate my question : is there a way, without nesting b( ) in a( ), to make b( ) available only in a( ) ? Just to clarify, what Duncan was referring to as the alternative was nesting the definition of one function in another, e.g. look at FUNx in by.data.frame -- FUNx

Re: [R] using subset() in data frame

2008-02-23 Thread Robert Walters
Erin Hodgess wrote: Hi Robert! Could you please check str(data.b) and see what you have for porosity? It needs to be a factor Thanks, Erin Erin, Yes, porosity is a factor. See output below. str(data.b) 'data.frame': 96 obs. of 7 variables: $ system : Factor w/ 6 levels

Re: [R] Hiding a function

2008-02-23 Thread Duncan Murdoch
On 23/02/2008 8:22 AM, Christophe Genolini wrote: Ok, I saw FUNx So, I reformulate my question : is there a way, without nesting b( ) in a( ), to make b( ) available only in a( ) ? Not that I know of. It will be available to anything using the same environment as a(), which in the case of a

[R] Standard method for S4 object

2008-02-23 Thread Christophe Genolini
Hi the list, I am defining a new class MyClass. Shortly, I will submit a package with it. Before, I would like to know if there is a kind of non official list of what method a new S4 object have. More precisely, personnaly, I use 'print', 'summary' and 'plot' a lot. So for my new class, I

Re: [R] using subset() in data frame

2008-02-23 Thread Robert Walters
Chuck Cleland wrote: On 2/23/2008 6:09 AM, Chuck Cleland wrote: On 2/22/2008 8:01 PM, Robert Walters wrote: Chuck, Thanks for the pointers on subset(). When I submit the two variants you suggested, below: fit1 - lm(y ~ x, subset(data.b, porosity == macro)) Error in eval(expr, envir, enclos)

Re: [R] Set without argument

2008-02-23 Thread Christophe Genolini
Thanks a lot The 'usual' way to write the above code is a - imputeMyObj(a) :-( I was hopping something like the use of the superassignator - inside imputeMyObj (I was hoping even if I did not find it myself)... To bad. But thanks for teaching me 'usual' pratice. It is something that

[R] Aranda-Ordaz

2008-02-23 Thread o ha wang
Hi all, Does anyone know R code or SAS code for Aranda-Ordaz link family? thanks, xiao yue - [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Standard method for S4 object

2008-02-23 Thread Thibaut Jombart
Christophe Genolini wrote: Hi the list, I am defining a new class MyClass. Shortly, I will submit a package with it. Before, I would like to know if there is a kind of non official list of what method a new S4 object have. More precisely, personnaly, I use 'print', 'summary' and 'plot' a lot.

Re: [R] Hiding a function

2008-02-23 Thread Christophe Genolini
After some private email with some high level programmer (Gabor), I have the solution and I can answer to my own question :-) The problem was 1° to define a function B( ) available only in a function A( ) (for code safeness) and 2° to define B( ) elsewhere than in A( ) (for code readability)

Re: [R] Aranda-Ordaz

2008-02-23 Thread jim holtman
I have no idea if it is helpful, but a quick google search turned up: LINKINF # Two S-PLUS functions to compute influence diagnostics ...The assumed logit link is embedded within the Aranda-Ordaz parametric # family of link functions. # Written by John Yick and Andy H. Lee ...

Re: [R] exprs function download

2008-02-23 Thread Tobias Verbeke
I am supposed to use exprs as a function. Where can i download exprs function? I tried searching at bioconductor and seach engine but no luck. Is it located in one of the library in R? source(http://bioconductor.org/biocLite.R;) biocLite(Biobase) library(Biobase) ?exprs HTH, Tobias

Re: [R] overdrawing a plot

2008-02-23 Thread hadley wickham
I had a similar problem, and Paul Murrell sent me a workaround: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/104038.html You can capture the ggplot drawing as a grid grob (gTree), edit that (no drawing occurs to this point), and then draw it ... Hadley realized that this is a bit

Re: [R] plotEst

2008-02-23 Thread hadley wickham
On Tue, Feb 19, 2008 at 3:53 PM, sigalit mangut-leiba [EMAIL PROTECTED] wrote: Sorry to disturb, I managed to plot 2 together with 'layer' like this: qplot(se, or, min=lcl1, max=ucl1, data=df1, geom=pointrange)+layer(data = df2, mapping = *aes*(x = se, y = OR2,min=lcl2,max=ucl2), geom =

Re: [R] Viable Approach to Parallel R?

2008-02-23 Thread Eric W Anderson
Hi Dan, I've had pretty good luck using Snow with with Rpvm. It's definitely not what you'd call plug and play, but it does work. I'm using it on a single computer to just take advantage of multiple processors, and it does a pretty good job of keeping them busy. The main gotchas I've found

Re: [R] Hiding a function

2008-02-23 Thread Hans-Peter
After some private email with some high level programmer (Gabor), I have shouldn't that rather be: high in knowledge but low in level? Best, Hans-Peter [[alternative HTML version deleted]]

Re: [R] Viable Approach to Parallel R?

2008-02-23 Thread Gabor Csardi
Similar experience, with snow MPI (LAM). Actually, plug and play. G. On Sat, Feb 23, 2008 at 10:57:22AM -0700, Eric W Anderson wrote: Hi Dan, I've had pretty good luck using Snow with with Rpvm. It's definitely not what you'd call plug and play, but it does work. I'm using it on a

[R] Error in ma.svd(X, 0, 0) : 0 extent dimensions

2008-02-23 Thread Marcelo Luiz de Laia
Hi, I run a maanova analysis and found this message error: Error in ma.svd(X, 0, 0) : 0 extent dimensions I did a google search and found this: \item ma.svd: function to compute the sigular-value decomposition of a rectangular matrix by using LAPACK routines DEGSVD AND ZGESVD.

Re: [R] using subset() in data frame

2008-02-23 Thread Robert Walters
Greg Snow wrote: Look carefully at the output and commands below. The first level of porosity is macro (notice the space at the end) but you are asking for macro (without the space). Computers are very literal, so macro is not equal to macro. T Greg and Chuck, Thanks for your very

[R] Bimodal deconvolution

2008-02-23 Thread Seth Imhoff
Hi Everyone- After searching through posts and my favorite R-help websites I'm still confused about a problem. I have data which is bimodal in nature, but there is no clearly obvious separation between the two peaks. In programs such as Origin, I can deconvolute the two distributions and

Re: [R] using subset() in data frame

2008-02-23 Thread Robert Walters
Chuck Cleland wrote: On 2/23/2008 9:13 AM, Robert Walters wrote: Chuck Cleland wrote: Chuck, For the record, I might add that that the following two variants for subsetting worked equally well: fit1 - lm(pore.pct ~ Db, subset(data.b, porosity == macro )) fit1 - lm(pore.pct ~ Db,

Re: [R] Bimodal deconvolution

2008-02-23 Thread Peter Dalgaard
Seth Imhoff wrote: Hi Everyone- After searching through posts and my favorite R-help websites I'm still confused about a problem. I have data which is bimodal in nature, but there is no clearly obvious separation between the two peaks. In programs such as Origin, I can deconvolute the

[R] clarification about glm

2008-02-23 Thread sigalit mangut-leiba
Hello, I have a question about glm: if i have a binary covariate (unit=1,0) the reference group would be 0? (prediction for unit=1) example: dat1-data.frame(y,unit,x1,x2) log_u - glm(y~.,family=binomial,data=dat1) summary(log_u) Estimate Std. Error z value Pr(|z|) (Intercept)

Re: [R] clarification about glm

2008-02-23 Thread Daniel Malter
Hi Sigalit, yes, you can see this from the fact that the table says unit1 meaning that it compares 1 to 0 and not vice versa. Everytime you regress on dummies the label will have added this to the original variable name. Say you have gender male and female. Then gendermale in the label of your

Re: [R] How to Include greek symbol in axis label?

2008-02-23 Thread Kenneth Takagi
Thanks for your help. I tried par(family=serif) and it worked well. I'm running R 2.6.1, on windows XP machine. font=6 appears to be similar to times new roman or serif, they appear to be very similar (to my untrained eye). Serif seems to work fine for my needs! Thanks, Ken Kenneth

Re: [R] plotEst

2008-02-23 Thread sigalit mangut-leiba
Thank you for your suggestion, now I get 2 lines but confidence limits just for the first one.. do you know what I'm doing wrong?! Thanks again, Sigalit. On 2/23/08, hadley wickham [EMAIL PROTECTED] wrote: On Tue, Feb 19, 2008 at 3:53 PM, sigalit mangut-leiba [EMAIL PROTECTED] wrote: Sorry

Re: [R] How to Include greek symbol in axis label?

2008-02-23 Thread Prof Brian Ripley
On Sat, 23 Feb 2008, Kenneth Takagi wrote: Thanks for your help. I tried par(family=serif) and it worked well. I'm running R 2.6.1, on windows XP machine. font=6 appears to be similar to times new roman or serif, they appear to be very similar (to my untrained eye). Serif seems to work

[R] Calculate missing value using a correlation metric

2008-02-23 Thread hochoi
Could someone please let me know how can I calculate missing values using a correlation metric? I know that the knn function is used for calculating missing values using Euclidean distance. Thanks -- View this message in context:

Re: [R] Newbie: Measuring distance between clusters.

2008-02-23 Thread Bill.Venables
One way to do it is to find the distances between ther centers (= centres in English) of the clusters. dist(kc$centers) It rather depends on how you define distances between clusters, though. There are many possibilities. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [R] exprs function download

2008-02-23 Thread Bill.Venables
RSiteSearch(exprs) will start you off. If not, ask whoever is requiring you to use it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keizer_71 Sent: Sunday, 24 February 2008 3:15 AM To: r-help@r-project.org Subject: [R] exprs function download

[R] where can I find source code for particle filters applied to stochastic volatilities?

2008-02-23 Thread Michael
Hi all, Could anybody point me to some overview/survey papers about using particle filters and sequential monte carlo methods to estimate stochastic volatilities? I couldn't find any such articles giving a big-picture view of the literature. How do these estimation methods compare to EMM and

Re: [R] Corrected : Efficient writing of calculation involving each element of 2 data frames

2008-02-23 Thread Felix Andrews
Vikas, Please provide reproducible code when posting to this list (read the posting guide). You need to vectorise your code to make it run faster. Here are some timing results for 3 different vectorised methods. All 3 methods take under 30 seconds to run on a pair of 30,000-vectors. The results