[R] R on Ubuntu Server

2008-11-19 Thread Ajay ohri
Dear List, Has anyone worked with R on Ubuntu Server edition. Also would it be possible to connect to this ever using remote desktop . In addition has anyone worked with using R from a Amazon EC2 cloud like structure. Any early previews of Azure SDk's and R . Could you guide me to a place where I

Re: [R] Calculating SD according to groups of rows

2008-11-19 Thread pufftissue pufftissue
Thank you for your help! It works beautifully, but how would I transpose the results? What I am getting is indeed: 7200 23955345638934 16.39977 10.0389611.234 14.02 I'd like the final output to be: subject_id hr_Stand_Deviation 7200 16.

[R] A Problem while Calculating Newey-West HAC

2008-11-19 Thread Hsiao-nan Cheung
Hi, Does anyone read Verbeek's "A Guide to Modern Econometrics"? In its Section 4.11, how does the last two equations' HAC calculate? I've tried several groups of parameters in sandwich::NeweyWest, but I still cannot get the same result. I've tried lag=2 and lag=3, as long as prewhite=FALSE and pre

Re: [R] simplify this instruction

2008-11-19 Thread Stavros Macrakis
The previous solutions assume you are only interested in one small interval, but if your original example is just a simplified version, and the real problem is multiple, possibly large, intervals, you might want to try something like this: c(NA,"A","B")[1+findInterval( <>, c(0,9+1) ) ] which

Re: [R] quantmod ATR problem

2008-11-19 Thread Jeff Ryan
This is a bug. It has now been fixed in the R-forge source. I will be updating the package in the next week or so with about a dozen more indicators, as well as some additional features. At that point I will push the change to CRAN. Thanks, Jeff Chris-672 wrote: > > Trying to plot ATR of tim

Re: [R] Calculating SD according to groups of rows

2008-11-19 Thread Simon Blomberg
How about: with(dat, tapply(HR, SUBJECT_ID, sd)) Assuming your data frame is named dat. On Wed, 2008-11-19 at 23:59 -0500, pufftissue pufftissue wrote: > *Hi all, > > I know this is probably basic, but I have proven to be a slow learner in any > programming language. Anyhow, > how can I calcu

Re: [R] Calculating SD according to groups of rows

2008-11-19 Thread Jorge Ivan Velez
Dear pufftissue, If your data set is a data.frame called 'x', one approach could be: # Data set x=read.table('clipboard',header=TRUE) # Calculations tapply(x$HR,x$SUBJECT_ID,sd,na.rm=TRUE) 720023955 16.39977 10.03896 See ?tapply and/or ?ave for more information. HTH, Jorge On Wed, N

[R] Calculating SD according to groups of rows

2008-11-19 Thread pufftissue pufftissue
*Hi all, I know this is probably basic, but I have proven to be a slow learner in any programming language. Anyhow, how can I calculate the SD for each person in my table? I have two patients in this R data.frame, 7200 and 23955. I extracted this from a relational database, but am I better off

Re: [R] how to replace NA with previous numbers

2008-11-19 Thread Jorge Ivan Velez
Dear Jeff, Take a look at this post: http://www.nabble.com/replacing-Na%27s-in-a-vector-with-the-preceding-integer-element-td20484941.html#a20484941 HTH, Jorge On Wed, Nov 19, 2008 at 10:59 PM, jeffc <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a vector with lots of NAs. e.g. > vec = c(NA,

Re: [R] how to replace NA with previous numbers

2008-11-19 Thread Gabor Grothendieck
See na.locf in the zoo package. On Wed, Nov 19, 2008 at 10:59 PM, jeffc <[EMAIL PROTECTED]> wrote: > > Hi, > > I have a vector with lots of NAs. e.g. > vec = c(NA, NA, 2, NA, NA, 5, NA, 6, NA) >> vec > [1] NA NA 2 NA NA 5 NA 6 NA > > I would like to replace NAs with their immediately previous n

[R] About continuity correction option in the mantelhaen.test function.

2008-11-19 Thread Paek, Insu
Hello, I was using the mantelhaen.test function (2x2 J tables for conditional independence testing). I noticed that the option for the continuity correction (correction=T or correction=F) sometimes made a difference while sometimes it did give the same results regardless of correction=T or corre

[R] how to replace NA with previous numbers

2008-11-19 Thread jeffc
Hi, I have a vector with lots of NAs. e.g. vec = c(NA, NA, 2, NA, NA, 5, NA, 6, NA) > vec [1] NA NA 2 NA NA 5 NA 6 NA I would like to replace NAs with their immediately previous non NA number. After replacement, the above vector will become > vec [1] 0 0 2 2 2 5 5 6 6. I understand how to

Re: [R] simplify this instruction

2008-11-19 Thread Rolf Turner
The issue worrying Wacek was presumably the fact that the original poster was treating the ``B'' variable as being character, rather than numeric. So (presumably) what he *really* wanted to say was (something like) ifelse(B%in%as.character(0:9),"A","B") Of course this is sheer pedantry. I'm s

Re: [R] simplify this instruction

2008-11-19 Thread David Winsemius
On Nov 19, 2008, at 8:38 PM, Wacek Kusnierczyk wrote: Jorge Ivan Velez wrote: B=0:12 B [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 ifelse(B%in%c(0:9),'A','B') [1] "A" "A" "A" "A" "A" "A" "A" "A" "A" "A" "B" "B" "B" given the example, the solution would rather be if (B %in% as.chara

Re: [R] Checking collinearity using lmer

2008-11-19 Thread Gustavo Carvalho
Take a look at vif in the package car. On Wed, Nov 19, 2008 at 10:00 PM, Crystal McRae <[EMAIL PROTECTED]> wrote: > > > I am running a logistic regression model with a random effect using lmer. I > am uncertain how to check for collinearity between my parameters. I have > already run cor() an

[R] More list to vector puzzle

2008-11-19 Thread Blanchette, Marco
Many thanks for the answers on my previous question, it got me started. Indeed, stack() was the function I was vaguely remembering. However, I didn¹t get very far because my data set is way more complicated then I expected. In fact I have a mixture of levels and lists within a list. Basically, it

[R] Checking collinearity using lmer

2008-11-19 Thread Crystal McRae
I am running a logistic regression model with a random effect using lmer. I am uncertain how to check for collinearity between my parameters. I have already run cor() and linear regression for each combination of parameters, and all Rsqr values were <0.8….but I am analyzing ecological data

Re: [R] ggplot2; dot plot, jitter, and error bars

2008-11-19 Thread hadley wickham
On Wed, Nov 19, 2008 at 5:34 PM, Juliet Hannah <[EMAIL PROTECTED]> wrote: > With this data > > x <- c(0,0,1,1,2,2) > y <- c(5,6,4,3,2,6) > lwr <- y-1 > upr <- y+1 > xlab <- c("Low","Low","Med","Med","High","High") > mydata <- data.frame(x,xlab,y,lwr,upr) > > I would like to make a dot plot and use

Re: [R] simplify this instruction

2008-11-19 Thread Wacek Kusnierczyk
Jorge Ivan Velez wrote: > >> B=0:12 >> B >> > [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 > >> ifelse(B%in%c(0:9),'A','B') >> > [1] "A" "A" "A" "A" "A" "A" "A" "A" "A" "A" "B" "B" "B" > > given the example, the solution would rather be if (B %in% as.character(0:9)) "A" else "B"

Re: [R] mle2 simple question - sigma?

2008-11-19 Thread Peter Dalgaard
Rice, Cliff G (DFW) wrote: I'm trying to get started with maximum likelihood estimation with a simple regression equivalent out of Bolker (Ecological Models and Data in R, p302). With this code: #Basic example regression library(bbmle) RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5)) names(Reg

[R] mle2 simple question - sigma?

2008-11-19 Thread Rice, Cliff G (DFW)
I'm trying to get started with maximum likelihood estimation with a simple regression equivalent out of Bolker (Ecological Models and Data in R, p302). With this code: #Basic example regression library(bbmle) RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5)) names(RegData)<-c("x", "y") linregfun

Re: [R] How to get robust M-estimator of multivariate scatter using Huber's psi?

2008-11-19 Thread Ted Young
Thanks again for the message. Tried to figure out but failed... I don't understand how to modify the \psi and combine it to covMest... Sorry for my poor programming skills. Can anyone give me some hints? Thanks a lot! Ted David Winsemius wrote: > > Look in robustbase; it has a psiFunc class.

Re: [R] simplify this instruction

2008-11-19 Thread Claudia Beleites
in addition to %in% and depending on what the general principle behind the setup is: you may want to have a look into switch (e.g. if there happen to be "C"s and "D"s...). or, of course you can check for B being between 0 and 9 rather than being the respective integers: ifelse ((B > 0) && (B

Re: [R] ggplot2; dot plot, jitter, and error bars

2008-11-19 Thread rmailbox
Do ?position_jitter You will see why the error message "unused arguments" is happening in your example. - Original message - From: "Juliet Hannah" <[EMAIL PROTECTED]> To: r-help@r-project.org Date: Wed, 19 Nov 2008 18:34:36 -0500 Subject: [R] ggplot2; dot plot, jitter, and error bars W

[R] ggplot2; dot plot, jitter, and error bars

2008-11-19 Thread Juliet Hannah
With this data x <- c(0,0,1,1,2,2) y <- c(5,6,4,3,2,6) lwr <- y-1 upr <- y+1 xlab <- c("Low","Low","Med","Med","High","High") mydata <- data.frame(x,xlab,y,lwr,upr) I would like to make a dot plot and use lwr and upr as error bars. Above 0=Low. I would like there to be some space between the 5 a

Re: [R] vector of zeros and ones

2008-11-19 Thread Erik Iverson
a <- rep(1, 1) , see ?rep [EMAIL PROTECTED] wrote: Dear Rolf, thank you for reply, I am interested with non random numbers. To be more precise, I would like to obtain two vectors a and b with a=(1,1,1,..,1,1) and b=(0,0,,0,0). The length of a and b is 1. Thank you

[R] vector of zeros and ones

2008-11-19 Thread hassen62
Dear Rolf, thank you for reply, I am interested with non random numbers. To be more precise, I would like to obtain two vectors a and b with a=(1,1,1,..,1,1) and b=(0,0,,0,0). The length of a and b is 1. Thank you Écoutez gra

Re: [R] How to return individual equation from {aidsEst} in package [micEcon]?

2008-11-19 Thread Arne Henningsen
On Monday 17 November 2008 21:24, Yang Wan wrote: > (1) With previous problem, I have tried the way you suggested, but I > still cannot do the tests. The problem here is that both {bgtest} and > {bptest} in package [lmtest] need a formula in their arguments as > follows, > > bgtest(formula, order =

Re: [R] Vector of ones and zeros

2008-11-19 Thread Rolf Turner
On 20/11/2008, at 11:47 AM, [EMAIL PROTECTED] wrote: Dear R people, what functions generate respectively vectors with each element is respectively zero and one. sorry for my credulous questions and many thanks in advance. If you want a *random* (i.i.d.) vector of zeroes and ones, then the

[R] Vector of ones and zeros

2008-11-19 Thread hassen62
Dear R people, what functions generate respectively vectors with each element is respectively zero and one. sorry for my credulous questions and many thanks in advance. Écoutez gratuitement le nouveau single de Noir Désir et découvrez d'au

Re: [R] Access violation when calling Front41

2008-11-19 Thread Arne Henningsen
Hi Siyi! My answer is late but I hope that it is not too late. On Friday 13 June 2008 16:04, Siyi FENG wrote: > Hello! When I tried to call Front41 in R, I met some problem. After I > entered: system ('front41.exe'), an error occured : > > "jwe0019i-u The program was terminated abnormally wit

Re: [R] Gmane-interface

2008-11-19 Thread Sebastian P. Luque
On Wed, 19 Nov 2008 21:49:54 + (UTC), Ben Bolker <[EMAIL PROTECTED]> wrote: [...] > Perhaps you would be willing (in the spirit of improving things) to > go to > http://gmane.org/info.php?group=gmane.comp.lang.r.general&edit=t > and specify some information so that the Gmane people can ch

Re: [R] simulation of autoregressive process

2008-11-19 Thread Rolf Turner
On 20/11/2008, at 10:54 AM, [EMAIL PROTECTED] wrote: Dear R users, I would like to simulate, for 2 replications, an autoregressive process: y(t)=0.8*y(t-1)+e(t) where e(t) is i.i.d.(0,sigma*sigma), Thank you in advance ?arima.sim Note to R-core: This is actually rather hard for a neo

Re: [R] simplify this instruction

2008-11-19 Thread Jorge Ivan Velez
I'm sorry, a typo: > B=0:12 > B [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 > ifelse(B%in%c(0:9),'A','B') [1] "A" "A" "A" "A" "A" "A" "A" "A" "A" "A" "B" "B" "B" HTH, Jorge On Wed, Nov 19, 2008 at 5:16 PM, Jorge Ivan Velez <[EMAIL PROTECTED]>wrote: > > Dear CE.KA, > > Try this: > > B=0:12 >

Re: [R] simulation of autoregressive process

2008-11-19 Thread Prof Brian Ripley
?arima.sim On Wed, 19 Nov 2008, [EMAIL PROTECTED] wrote: Dear R users, I would like to simulate, for 2 replications, an autoregressive process: y(t)=0.8*y(t-1)+e(t) where e(t) is i.i.d.(0,sigma*sigma), Thank you in advance ??coutez gra

Re: [R] simplify this instruction

2008-11-19 Thread Jorge Ivan Velez
Dear CE.KA, Try this: B=0:12 > B [1] 0 1 2 3 4 5 6 7 8 9 10 11 12 > ifelse(B%in%c(0,9),'A','B') [1] "A" "B" "B" "B" "B" "B" "B" "B" "B" "A" "B" "B" "B" HTH, Jorge On Wed, Nov 19, 2008 at 4:42 PM, CE.KA <[EMAIL PROTECTED]> wrote: > > Hi R users, > > Is there a way to simplify thi

[R] simplify this instruction

2008-11-19 Thread CE.KA
Hi R users, Is there a way to simplify this instruction: ifelse(B=="0","A", ifelse(B=="1","A", ifelse(B=="2","A", ifelse(B=="3","A", ifelse(B=="4","A", ifelse(B=="5","A", ifelse(B=="6","A", ifelse(B=="7","A", ifelse(B=="8","A", ifelse(B=="9","A","B")) i am looking for something like this

[R] simulation of autoregressive process

2008-11-19 Thread hassen62
Dear R users, I would like to simulate, for 2 replications, an autoregressive process: y(t)=0.8*y(t-1)+e(t) where e(t) is i.i.d.(0,sigma*sigma), Thank you in advance Écoutez gratuitement le nouveau single de Noir Désir et découvrez d'au

Re: [R] Gmane-interface

2008-11-19 Thread Ben Bolker
Oliver Bandel first.in-berlin.de> writes: > > It seems, at this R-mailing list some poeple are somehow arrogant and > ignorant, > not looking for doing things better. > > Ciao, >Oliver > Perhaps you would be willing (in the spirit of improving things) to go to http://gmane.org/info.php

Re: [R] Multidimensional array with R

2008-11-19 Thread Rolf Turner
On 20/11/2008, at 8:51 AM, Michael Zak wrote: Hi there I know, I'm sure you discussed this stuff 100 times, but I really have a basic understanding problem, if and how do I create a multidimensional array in R. I'm coming from MATLAB and there it's as easy as you ever could imagine. Ok, so, I

Re: [R] error in function: nls (urgent)

2008-11-19 Thread Douglas Bates
On Tue, Nov 18, 2008 at 6:19 AM, tedzzx <[EMAIL PROTECTED]> wrote: > Hi,all: > I am running a nonlinear regression and there is a problem. Yes. The problem is that there is a singular gradient matrix at the initial parameter estimates. You will need to modify your function or your initial param

Re: [R] F-Tests in generalized linear mixed models (GLMM)

2008-11-19 Thread Douglas Bates
On Wed, Nov 19, 2008 at 9:16 AM, Björn Stollenwerk <[EMAIL PROTECTED]> wrote: > Thanks! I am talking about any kind of model comparison technique. > > However, some p-values based on F-Tests are supplied, based on the GLMM with > Gamma distribution and log-link function (see output below). I think

Re: [R] skeleton for package containing C code?

2008-11-19 Thread Thomas Petzoldt
Rainer M Krug wrote: Hi I looked in the "writing R extensions" and also into package.skeleton, but could not find anything: I am looking for a skeleton or simple example on how to create a package which contains C++ code. I only want to implement one function, so nothing complicated. The idea

Re: [R] GAMM and anove.lme question

2008-11-19 Thread Simon Wood
David, Your examples assume gaussian errors and an identity link, so in this case your GAMMs are just linear mixed models and the likelihoods are fine. (This would not have been the case for non-gaussian errors and/or non-identity link, when PQL would have been used for fitting and the `likelih

Re: [R] How to get robust M-estimator of multivariate scatter using Huber's psi?

2008-11-19 Thread David Winsemius
Look in robustbase; it has a psiFunc class. On Nov 19, 2008, at 2:26 PM, rlearner309 wrote: Yes I did. But the closest I found is the covMest function in rrcov package, which uses biweight function, which is rescending. Unfortunately, I need to use Huber's psi function to derive multiv

Re: [R] random value changes in a vector

2008-11-19 Thread David Winsemius
Using rbinom might be more clear than my sample() solution. May I speculate without actual testing that: inv <- 2*rbinom(length(vec),1,0.5) - 1 might be more efficient than a 2-step rbinom / ifelse strategy? -- David Winsemius Heritage Labs On Nov 18, 2008, at 5:21 PM, joris meys wrote: T

Re: [R] Exclude holidays in a subset of dates?

2008-11-19 Thread Diethelm Wuertz
Gabor Grothendieck wrote: There are the timeDate and timeSeries packages with very powerful possibilities to handle weekdays, weekends and public holidays for the G7 countries and CH. You can create your own holiday calenders for many countries including fix and moveable holidays. Note, this

Re: [R] formula in lmer including both nested and crossed effects

2008-11-19 Thread Douglas Bates
On Wed, Nov 19, 2008 at 1:37 PM, Eduardo G. Martins <[EMAIL PROTECTED]> wrote: > Dear all, > I was wondering if someone could help me with the specification of a > formula including both nested and crossed effects in the same model in > lmer. I have one predictor variable, x, and three grouping fa

Re: [R] Mathematica now working with Nvidia GPUs --> any plan for R?

2008-11-19 Thread Peter Dalgaard
Stefan Evert wrote: > > On 19 Nov 2008, at 07:56, Prof Brian Ripley wrote: > >>> I just read an announcement saying that Mathematica is launching a >>> version working with Nvidia GPUs. It is claimed that it'd make it >>> ~10-100x faster! >>> http://www.physorg.com/news146247669.html >> >> Well,

[R] formula in lmer including both nested and crossed effects

2008-11-19 Thread Eduardo G. Martins
Dear all, I was wondering if someone could help me with the specification of a formula including both nested and crossed effects in the same model in lmer. I have one predictor variable, x, and three grouping factors, a,b and c. Factor b is nested in a but is partially crossed with c. Also, I'm in

[R] Multidimensional array with R

2008-11-19 Thread Michael Zak
Hi there I know, I'm sure you discussed this stuff 100 times, but I really have a basic understanding problem, if and how do I create a multidimensional array in R. I'm coming from MATLAB and there it's as easy as you ever could imagine. Ok, so, I want to have an array, where I can fill i

[R] formula in lmer including both nested and crossed effects

2008-11-19 Thread Eduardo G. Martins
Dear all, I was wondering if someone could help me with the specification of a formula including both nested and crossed effects in the same model in lmer. I have one predictor variable, x, and three grouping factors, a,b and c. Factor b is nested in a but is partially crossed with c. Also, I'm in

Re: [R] Exclude holidays in a subset of dates?

2008-11-19 Thread Gabor Grothendieck
chron has some facilities for this that also work with "Date" class: library(chron) startDate <- as.Date("2008-08-15") endDate <- as.Date("2008-09-15") AllDays <- seq(startDate, endDate, by="day") Holidays <- as.chron(as.Date("2008-09-01")) is.workday <- !is.holiday(AllDays, Holidays) & !is.weeken

[R] formula in lmer including both nested and crossed effects

2008-11-19 Thread Eduardo G. Martins
Dear all, I was wondering if someone could help me with the specification of a formula including both nested and crossed effects in the same model in lmer. I have one predictor variable, x, and three grouping factors, a,b and c. Factor b is nested in a but is partially crossed with c. Also, I'm in

[R] Influence diagnostics for nlme / lme objects

2008-11-19 Thread Anthony A. Pezzola
I am hoping that some one might be to tell me whether there are any functions that produce influence measures for lme /nlme objects (i.e those suggested by Lesaffre and Verbeke or Langford and Lewis for multilevel models). Thanks in advance. ---

Re: [R] How to get robust M-estimator of multivariate scatter using Huber's psi?

2008-11-19 Thread rlearner309
Yes I did. But the closest I found is the covMest function in rrcov package, which uses biweight function, which is rescending. Unfortunately, I need to use Huber's psi function to derive multivariate scatter, and I hope I can try different thresholds. Any help? Thanks a lot!!! David

Re: [R] Exclude holidays in a subset of dates?

2008-11-19 Thread hadley wickham
On Wed, Nov 19, 2008 at 12:54 PM, Brigid Mooney <[EMAIL PROTECTED]> wrote: > Hi All, > > I am iterating through dated materials, with variable start and end dates, > and would like to skip procedures everytime I encounter a weekend or > holiday. To do this, I thought the easiest way would be to cr

Re: [R] RMySQL 0.6-1 Package Install Fails in R 2.5.1 (pclinuxos)

2008-11-19 Thread Patrick Connolly
On Wed, 19-Nov-2008 at 08:25AM -0500, Matt Cook wrote: > I am having difficulties installing the RMySQL package (0.6-1) on a > clean install of pclinuxos with R version 2.5.1. My version of the OS > came with R-base already installed along the RKWard GUI front end.I have > attempted to install

Re: [R] How to get robust M-estimator of multivariate scatter using Huber's psi?

2008-11-19 Thread David Winsemius
Have you looked at the obvious Task View yet? http://cran.r-project.org/web/views/Robust.html -- David Winsemius On Nov 19, 2008, at 1:07 PM, rlearner309 wrote: How to get robust M-estimators of multivariate scatter using Huber's psi? Which package/function should I look into? Ideally

Re: [R] tapply and any

2008-11-19 Thread Peter Alspach
Stephan Try: tapply(y[,2], y[,1], function(x) any(x==5)) Peter Alspach > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Stephan Lindner > Sent: Thursday, 20 November 2008 7:48 a.m. > To: [EMAIL PROTECTED] > Subject: [R] tapply and any > > > De

Re: [R] tapply and any

2008-11-19 Thread Henrique Dallazuanna
Try this: sapply(tapply(y[,2],na.omit(y[,1]), `==`, 5), any) On Wed, Nov 19, 2008 at 4:47 PM, Stephan Lindner <[EMAIL PROTECTED]> wrote: > > Dear all, > > > A quick question which I somehow cannto figure out: I want to apply > the function "any" to subsets of a dataset in order to create a vecto

[R] Exclude holidays in a subset of dates?

2008-11-19 Thread Brigid Mooney
Hi All, I am iterating through dated materials, with variable start and end dates, and would like to skip procedures everytime I encounter a weekend or holiday. To do this, I thought the easiest way would be to create a TRUE/FALSE vector corresponding to each day where it is TRUE if a workday, an

[R] tapply and any

2008-11-19 Thread Stephan Lindner
Dear all, A quick question which I somehow cannto figure out: I want to apply the function "any" to subsets of a dataset in order to create a vector with TRUE/FALSE values, depending on whether a subset has the number 5. I.e., y <- matrix(c(1,2,3,3,4,5,5,6,6,7,5,1,1,3,5,NA,5,1,1,3),ncol=2) > y

Re: [R] R ORM?

2008-11-19 Thread Paul Gilbert
Faheem Mitha wrote: Hi Hans, Thanks for the reply. On Tue, 18 Nov 2008, Hans Werner Borchers wrote: Faheem Mitha email.unc.edu> writes: Hi, Does anyone know of an R ORM (Object Relational Mapper)? I'm thinking of something similar to sqlalchemy (http://www.sqlalchemy.org/). Alternative

Re: [R] Cannot quit R - fame package issue?

2008-11-19 Thread Jeffrey J. Hallman
I am the author of the 'fame' package, and I can confirm that earlier versions did indeed use Greg Warnes addLast() function to add to the user's .Last() function. The current version no longer does so. Jeff Dan Slayback <[EMAIL PROTECTED]> writes: > Thanks very much for the tips. Simply remo

[R] How to get robust M-estimator of multivariate scatter using Huber's psi?

2008-11-19 Thread rlearner309
How to get robust M-estimators of multivariate scatter using Huber's psi? Which package/function should I look into? Ideally, I hope I can self-define thresholds of Huber's psi function. Thanks a lot!!! -- View this message in context: http://www.nabble.com/How-to-get-robust-M-estimator-of-mult

Re: [R] GAMM and anove.lme question

2008-11-19 Thread Gavin Simpson
On Wed, 2008-11-19 at 09:33 -0500, David M Warner wrote: > Greetings all > The help file for GAMM in mgcv indicates that the log likelihood for a > GAMM reported using > > summary(my.gamm$lme) (as an example) is not correct. It is slightly more specific than that. It mentions that glmmPQL was us

Re: [R] Oja median - fortune candidate

2008-11-19 Thread Sarah Goslee
I nominate: On Wed, Nov 19, 2008 at 12:18 PM, roger koenker <[EMAIL PROTECTED]> wrote: > Cross posting is sociopathic. -- Sarah Goslee http://www.functionaldiversity.org __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-hel

Re: [R] Oja median

2008-11-19 Thread Rahul-A.Agarwal
Apologies Roger, if you find anything wrong with the mail. Thanks for the reference Roger. IS there anything else which I can look at, say something in R itself? Regards and thanks once again Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyderabad On Net: 19 533 6363 -

Re: [R] Oja median

2008-11-19 Thread roger koenker
Cross posting is sociopathic. The Oja median _is_ robust in several reasonable senses, but admittedly not from a breakdown perspective. There are several other options: for a good review see, e.g. Multivariate Median, A. Niinimaa and H. Oja Encyclopedia of Statistical Sciences url:www.eco

Re: [R] Bucketing/Grouping Probabilities

2008-11-19 Thread Random Walker
Many Thanks! It's a good start for me. Slight typo in your reply as should be x <- c(0.049, 0.129, 0.043, 0.013, 0.015, 0.040, 0.066, 0.038, 0.2040, 0.0221, 0.234, 0.0443, 0.0684, 0.035) . . . This gives me old new 1 0.0490 0.04155 2 0.1290 0.12900 3 0.0430 0.04155 4 0.013

Re: [R] Bucketing/Grouping Probabilities

2008-11-19 Thread Random Walker
Correction: I made some mistake in my bucket/cluster list. It should be: [((4, 5, 10), 0.024), ((1, 3, 6, 8, 12, 14), 0.049), ((7, 13), 0.072), ((2), 0.121), ((9, 11), 0.185)] -- View this message in context: http://www.nabble.com/Bucketing-Grouping-Probabilities-tp20582544p20583699.html

Re: [R] selection list

2008-11-19 Thread Greg Snow
One simple way would be to just use the edit function: > mydata <- edit( data.frame( param1=numeric(0), param2=numeric(0), > param3=numeric(0) ) ) > write.table(mydata, 'myfile') A little more fancy interface could come from using the tkexamp function in the TeachingDemos package (with wait=TRU

Re: [R] skeleton for package containing C code?

2008-11-19 Thread Dirk Eddelbuettel
On 19 November 2008 at 18:44, Rainer M Krug wrote: | I looked in the "writing R extensions" and also into package.skeleton, | but could not find anything: | | I am looking for a skeleton or simple example on how to create a | package which contains C++ code. | | I only want to implement one func

Re: [R] install SPIA package on Windows

2008-11-19 Thread Prof Brian Ripley
Both the 'Writing R Extensions' and 'R Installation and Administration' manuals point you at the win-builder service. The latter also tells you how to set Windows up to build source packages. On Wed, 19 Nov 2008, Erika Melissari wrote: Hello all, I would like to install a new R package name

[R] skeleton for package containing C code?

2008-11-19 Thread Rainer M Krug
Hi I looked in the "writing R extensions" and also into package.skeleton, but could not find anything: I am looking for a skeleton or simple example on how to create a package which contains C++ code. I only want to implement one function, so nothing complicated. The idea is to use the package t

Re: [R] Create vector of data frames

2008-11-19 Thread Duncan Murdoch
On 11/19/2008 11:27 AM, Brigid Mooney wrote: Hi All, I'm sorry I haven't been able to find anything that will help me with this problem, and I'm still pretty new to R - so any help here is greatly appreciated! I am looking to create a vector in a sequential process where each entry in the vecto

[R] install SPIA package on Windows

2008-11-19 Thread Erika Melissari
Hello all, I would like to install a new R package named SPIA, but I have only the source version ( tar.gz version) and I work with windows. Can anyone support to me any information to perform the installation of this package? Any suggestion will be appreciated. Thank you Erika [[alt

[R] Create vector of data frames

2008-11-19 Thread Brigid Mooney
Hi All, I'm sorry I haven't been able to find anything that will help me with this problem, and I'm still pretty new to R - so any help here is greatly appreciated! I am looking to create a vector in a sequential process where each entry in the vector is a data frame, for example: days <- 3 for

Re: [R] Bucketing/Grouping Probabilities

2008-11-19 Thread Gabor Grothendieck
Try this: x <- c(1, 0.049, 0.129, 0.043, 0.013, 0.015, 0.040, 0.066, 0.038, 0.2040, 0.0221, 0.234, 0.0443, 0.0684, 0.035) cl <- kmeans(x, 5) cl newold <- with(cl, data.frame(old = x, new = centers[cluster])) newold On Wed, Nov 19, 2008 at 10:43 AM, Random Walker <[EMAIL PROTECTED]> wrote:

Re: [R] Installation of R on a SUSE SLES platform

2008-11-19 Thread Detlef Steuer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi! If you go there: http://software.opensuse.org/search and look for r-base on SLE 10 you should get what you are looking for. I don't put SLE rpms on CRAN because I can't support them on SLE. I've no SLE install available. If you want to compile

[R] selection list

2008-11-19 Thread thoeb
Hello! I want to create a command for choosing input parameters via a new window that shows a table in which the parameters can be written in. R should open a seperate window in which the user is asked to put in some values (just numbers), afterwards a new file containing these values should be c

[R] Bucketing/Grouping Probabilities

2008-11-19 Thread Random Walker
I have a list of entrants (1-14 in this example) in a competitive event and corresponding win probabilities for each entrant. [(1, 0.049), (2, 0.129), (3, 0.043), (4, 0.013), (5, 0.015), (6, 0.040), (7, 0.066), (8, 0.038), (9, 0.204), (10, 0.022), (11, 0.234), (12, 0.044), (13, 0.068),

[R] Installation of R on a SUSE SLES platform

2008-11-19 Thread Hervé CHAPUIS
Hi, I am currently trying to install R on our serveur. It is a SUSE LINUX Entreprise Serveur 10 version. I can't use the binaries which are compiled for OPEN SUSE, can I ? So I have downloaded the .tar.gz file When configuring I got the following error message configure: error: --with-readline=ye

Re: [R] F-Tests in generalized linear mixed models (GLMM)

2008-11-19 Thread Björn Stollenwerk
Thanks! I am talking about any kind of model comparison technique. However, some p-values based on F-Tests are supplied, based on the GLMM with Gamma distribution and log-link function (see output below). I think this can be done, because the parameter estimates are approximately normal distri

Re: [R] How to look within .Internal ?

2008-11-19 Thread Duncan Murdoch
On 11/19/2008 10:13 AM, megh wrote: In the optim() function there is a syntax : res <- .Internal(optim(par, fn1, gr1, method, con, lower, Here how can I see the inside-codes of ".Internal" function ? You need the R source code. Then find src/main/names.c, and look up "optim". It will te

[R] How to look within .Internal ?

2008-11-19 Thread megh
In the optim() function there is a syntax : res <- .Internal(optim(par, fn1, gr1, method, con, lower, Here how can I see the inside-codes of ".Internal" function ? Regards, -- View this message in context: http://www.nabble.com/How-to-look-within-.Internal---tp20581897p20581897.html Sent fr

Re: [R] F-Tests in generalized linear mixed models (GLMM)

2008-11-19 Thread Douglas Bates
On Wed, Nov 19, 2008 at 6:55 AM, Björn Stollenwerk <[EMAIL PROTECTED]> wrote: > Hi! > I would like to perform an F-Test over more than one variable within a > generalized mixed model with Gamma-distribution > and log-link function. Are you using the phrase "F-Test" as a general term for model com

[R] GAMM and anove.lme question

2008-11-19 Thread David M Warner
Greetings all The help file for GAMM in mgcv indicates that the log likelihood for a GAMM reported using summary(my.gamm$lme) (as an example) is not correct. However, in a past R-help post (included below), there is some indication that the likelihood ratio test in anova.lme(mygamm$lme, mygamm1

Re: [R] do.call and plotting functions ...

2008-11-19 Thread Prof Brian Ripley
The help pages (here for bquote) are your friend. I don't think you really want to do this via do.call(), as you want some arguments evaluated and some unevaluated. Rather, match.call(), alter it as you want, and then eval.parent it. Something like ploteps <- function(file, plotFunction, ..

Re: [R] do.call and plotting functions ...

2008-11-19 Thread Gabor Grothendieck
Try this: f <- function(cmd, ...) { cat("Hello\n") mc <- match.call() mc <- mc[-1] eval.parent(mc) cat("Goodbye\n") } f(plot, 1:10) On Wed, Nov 19, 2008 at 8:57 AM, Roberto Brunelli <[EMAIL PROTECTED]> wrote: > I'm trying to write a simple wrapper for plot

[R] do.call and plotting functions ...

2008-11-19 Thread Roberto Brunelli
I'm trying to write a simple wrapper for plotting functions to make them print to postscript, something like ploteps <- function(file, plotFunction, ...) { args <- list(bquote(...)) # prepare postscript device do.call(plot, args) # close postscript device } I have inserted the bquote

Re: [R] C++ code from R

2008-11-19 Thread Rainer M Krug
On Wed, Nov 19, 2008 at 2:57 PM, Duncan Temple Lang <[EMAIL PROTECTED]> wrote: > > > Rainer M Krug wrote: >> >> Hi >> >> I managed to compile (and use) C code from R, but now I have to use C++ >> code. >> After reading "Writing R extensions", I came up with the following >> code, which compiles fin

[R] RMySQL 0.6-1 Package Install Fails in R 2.5.1 (pclinuxos)

2008-11-19 Thread Matt Cook
I am having difficulties installing the RMySQL package (0.6-1) on a clean install of pclinuxos with R version 2.5.1. My version of the OS came with R-base already installed along the RKWard GUI front end.I have attempted to install the package through RKWard however I have had some problems.

[R] F-Tests in generalized linear mixed models (GLMM)

2008-11-19 Thread Björn Stollenwerk
Hi! I would like to perform an F-Test over more than one variable within a generalized mixed model with Gamma-distribution and log-link function. For this purpose, I use the package mgcv. Similar tests may be done using the function "anova", as for example in the case of a normal distributed

Re: [R] C++ code from R

2008-11-19 Thread Duncan Temple Lang
Rainer M Krug wrote: Hi I managed to compile (and use) C code from R, but now I have to use C++ code. After reading "Writing R extensions", I came up with the following code, which compiles fine --- // emdL1_R.cc: #include #include #include "emdL1.h" extern "C" { void em

[R] C++ code from R

2008-11-19 Thread Rainer M Krug
Hi I managed to compile (and use) C code from R, but now I have to use C++ code. After reading "Writing R extensions", I came up with the following code, which compiles fine --- // emdL1_R.cc: #include #include #include "emdL1.h" extern "C" { void emd_L1( doubl

Re: [R] Parsing regular expressions differently - feature request

2008-11-19 Thread Duncan Murdoch
On 18/11/2008 1:36 PM, William Dunlap wrote: Duncan Murdoch murdoch at stats.uwo.ca Sat Nov 8 15:41:34 CET 2008 wrote: On 08/11/2008 7:20 AM, John Wiedenhoeft wrote: Hi there, I rejoiced when I realized that you can use Perl regex from within R. However, as the FAQ states "Some functions, pa

[R] Oja median

2008-11-19 Thread Rahul-A.Agarwal
Hi Roger, As we know that The Oja median has (finite) breakdown point 2/n, i.e., is not robust in any reasonable sense, and is quite expensive to compute, so do we have some better methodology to compute multivariate median Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyder

[R] quantmod ATR problem

2008-11-19 Thread Chris
Trying to plot ATR of time series using SMA using quantmod, plots fine with maType="EMA". However, when I use maType="SMA" I get the following error: Error in SMA(c(0, 0, 0, 0, 0, ... : unused arguments(s) (wilder = FALSE) Calls: addATR -> ATR -> do.call -> SMA Execution halted The code I am u

  1   2   >