Re: [R] Using if statement on function

2010-06-28 Thread Keith Jewell
You could also consider isTRUE(all.equal(FUN, mean)) > isTRUE(all.equal(mean, mean)) [1] TRUE > isTRUE(all.equal(mean, median)) [1] FALSE HTH Keith J "Patrick Burns" wrote in message news:4c28777f.1040...@pburns.seanet.com... > If I understand the problem properly, > you want something li

Re: [R] Using if statement on function

2010-06-28 Thread Patrick Burns
If I understand the problem properly, you want something like this: function(FUN, ...) { FunName <- deparse(substitute(FUN)) if(FunName == "mean") { ... } else if(FunName == "median") { ... } } Using 'switch' is an alternative to 'i

[R] Exponential Smoothing: Forecast package

2010-06-28 Thread phani kishan
Hey, I am using the ets() function in the forecast package to find out the best fit parameters for my time-series. I have about 50 sets of time series data. I'm currently using the function as follows: ets(x,model="AZZ",opt.crit="mse") As to my observation about 5-10 of them have been identifie

[R] Using if statement on function

2010-06-28 Thread Etienne Stockhausen
Hello everybody, I'm trying to use a if-statment on a function. For a better understanding I want to present a small example: FUN=mean # could also be median,sd or any other function if (FUN == mean) plot(...) if (FUN == median) plot(...)

[R] Multiple Treatments Meta-analysis (MTM)

2010-06-28 Thread Pryseley Assam
Dear R Users, Is there a package that performs multiple-treatment meta-analysis in R? Also, most of the articles I read that apply MTM are interested in combining direct and indirect effects. I am interested in adjusting for multiple comparisons within the same study (multiple compari

Re: [R] Plotrix Trick

2010-06-28 Thread Lorenzo Isella
Yes, I believe I did something along your lines. See the code snippet at the end of the email which sorts everything out as far as I am concerned. Cheers Lorenzo # library(Cairo) library(plotrix) set.seed(1234) myseq <- abs(

[R] Note on PCA (not directly with R)

2010-06-28 Thread Christofer Bogaso
Dear all, I am looking for some interactive study materials on Principal component analysis. Basically I would like to know what we are actually doing with PCA? What is happening within the dataset at the time of doing PCA. Probably a 3-dimensional interactive explanation would be best for me. I

[R] Forecast Package in R: auto.arima function

2010-06-28 Thread phani kishan
Hey, I have a few doubts with regard to the usage of the auto.arima function from the forecast package in R. *Background:* I have a set of about 50 time-series for which I would like to estimate the best autroregressive model. (I want to estimate the coefficients and order of p). Each of the serie

Re: [R] package(pls) - extracting explained Y-variance

2010-06-28 Thread Bjørn-Helge Mevik
Christian Jebsen writes: > Dear R-help users, > > I'd like to use the R-package "pls" and want to extract the explained > Y-variance to identify the important (PLS-) principal components in my > model, related to the y-data. For explained X-variance there is a function: > "explvar()". If I under

Re: [R] Euclidean Distance Matrix Analysis (EDMA) in R?

2010-06-28 Thread gokhanocakoglu
basicly I am using standart shape package in R, no need additional code for analysis http://cran.r-project.org/web/packages/shapes/index.html http://cran.r-project.org/web/packages/shapes/shapes.pdf anf the main reference is Statistical Shape Analysis (http://www.amazon.com/Statistical-Shape-An

<    1   2