Re: [R] The W statistic in wilcox.exact

2006-10-05 Thread Torsten Hothorn
On Thu, 5 Oct 2006, Christos Hatzis wrote: > Jue, > > On a second look, it appears that wilcox.test does report the > offset-adjusted statistic U, as also mentioned in the help page. > > wilcox.test returns W=6 (instead of 12 as your example showed, unless > "wilcox_test" is a different function)

[R] hist plot

2006-10-05 Thread Baoqiang Cao
Hi there, I really couldn't find out how to plot histogram with point/line instead of rectangle for each bin? Any help please? Thanks! Best, -Cao __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] Goodness of fit with robust regression

2006-10-05 Thread Celso Barros
Dear list members, I have been doing robust regressions in R, using the MASS package for rlm and robustbase for logistic regressions. I must be doing something wrong, because my output does not include r-squares (or adjusted r-squares), or, in the case of glmrob, -2log likelihoods. Does any

Re: [R] How to get the function names

2006-10-05 Thread Gabor Grothendieck
In looking at this once more I realize that I did not really answer the question which was how to get the getFunNames function that you defined to run in another funciton. Use do.call with match.call to replicate the calling sequence: myfun <- function(x) { do.call(getFunNames, list(match

[R] DSC final call

2006-10-05 Thread Paul Murrell
Hi This is a final call for abstracts; the deadline for submitting abstracts is October 15 2006. Please forward and circulate to other interested parties. [apologies for any cross-posting] DSC 2007, a conference on systems and environments for statistical computing, will take place in Auckland,

[R] Bivariate Weibull distribution -- Copula

2006-10-05 Thread David Duffy
"Jenny Stadt" <[EMAIL PROTECTED]> asked: > > I am struggling in a bivariate Weibull distribution although I > searched R-Site-Help and found suggestion with Copula. Seems the > maximum likelihood estimate is beyond what I can understand. > > My case is: given two known marginal distribution (both

[R] Small help with plot.mca

2006-10-05 Thread Jose Claudio Faria
Dear list, Please, how can I get all the levels of the same factor to have the same color and different color for each factor? Script: library(MASS) plot(mca(farms, abbrev = TRUE), rows=F) Thanks in advance, -- Jose Claudio Faria Brasil/Bahia/Ilheus/UESC/DCET Estatística Experimental/Prof. Ad

Re: [R] convert day of week from number to character and include in lm

2006-10-05 Thread Ferdinand Alimadhi
lm(dep ~ as.factor(WKDY) but if you want WKDYs as character you can make the appropriate changes in your dataset > days<-c("mon","tue","wed","thu","fri","sat","sun") > for(i in 1:7) + D$WKDY[D$WKDY==i]<-days[[i]] suppossing that D is your dataframe HTH Spencer Jones wrote: >All, > >I am tr

Re: [R] emacs-ess tab indentation

2006-10-05 Thread Richard M. Heiberger
Use the command ess-set-style and set it to BSD. See the documentation in ESS, starting with C-h f ess-set-style It is described in the documentation for ESS, either .../doc/html/ess.html or .../doc/info/ess.info Search for "indent" If you have followup questions on this topic, please use t

[R] a question on using arules package

2006-10-05 Thread Weiwei Shi
hi, there: I have a question on use of arules package: suppose i have a classification problem with class id = 1 or 0. i put predictors and class ids together and tranform all of them into binary thus i got a binary matrix. When I build the rules from it, I subset the rules to 2 by defining rhs

Re: [R] Plotting text with lattice

2006-10-05 Thread Ritwik Sinha
Thanks Gabor, I realized I could also use this code xyplot(x ~ x | g, data = data.frame(x = 1:12, g = gl(3,4)), groups=g, panel = function(..., groups, subscripts) { panel.xyplot(...) panel.text(x=2, y=4, labels=groups[subscripts]) }) Which is essentially a rewrite of one of the exam

Re: [R] How to get the function names

2006-10-05 Thread Gabor Grothendieck
I should have mentioned is that the way it works is that it uses the name of the list component, if any, otherwise it uses the name of the function if its given as a name and otherwise it uses the function itself or possibly the name of the list. > > On 10/5/06, Gabor Grothendieck <[EMAIL PROTECTE

Re: [R] How to get the function names

2006-10-05 Thread Gabor Grothendieck
I should have mentioned is that the way it works is that it uses the name of the list component, if any, otherwise it uses the name of the function if its given as a number and otherwise it uses the function itself or possibly the name of the list. On 10/5/06, Gabor Grothendieck <[EMAIL PROTECTED]

Re: [R] Aggregate Values for All Levels of a Factor

2006-10-05 Thread Marc Schwartz
On Thu, 2006-10-05 at 15:44 -0700, Kaom Te wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello, > > I'm a novice user trying to figure out how to retain NA aggregate > values. For example, given a data frame with data for 3 of the 4 > possible factor colors("orange" is omitted from

Re: [R] How to get the function names

2006-10-05 Thread Gabor Grothendieck
Probably the best you can hope for is to cover most cases. This one uses match.call and handles a number of cases and perhaps if you spend more time on it might be able to add some cases where it fails such as the second L below: f <- function(x) { if (!is.list(x)) x <- list(x) if

Re: [R] Block comments in R?

2006-10-05 Thread Richard A. O'Keefe
Please let's not waste any time trying to figure out how to add block comments to R. In any guise they are highly error prone. Although its precursors (PL/I and Pascal) had block comments and did not have end-of-line comments, the programming language Ada was explicitly designed to have end-of-lin

Re: [R] xyplot

2006-10-05 Thread David Barron
If you include a conditioning factor (here it is the variable "groups") you will get more than one panel. To get loess curves for the two groups, the easiest way is to use the type argument: > xyplot(y ~ time, groups=group,data=df,type=c("p","smooth")) On 05/10/06, Osman Al-Radi <[EMAIL PROTECTE

[R] solaris 64 build?

2006-10-05 Thread roger koenker
We have a solaris/sparc machine that has been running an old version of R-devel: Version 2.2.0 Under development (unstable) (2005-06-04 r34577) which was built as m64 from sources. Attempting to upgrade to 2.4.0 the configure step goes ok, but I'm getting early on from make: > gcc -m64 -L/o

[R] Aggregate Values for All Levels of a Factor

2006-10-05 Thread Kaom Te
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I'm a novice user trying to figure out how to retain NA aggregate values. For example, given a data frame with data for 3 of the 4 possible factor colors("orange" is omitted from the data frame), I want to calculate the average height by color,

[R] [OT] testing for synchronicity

2006-10-05 Thread Andrew Robinson
Greetings, friends in the R community, this is an OT question about statistics. Given four time series of events, what possibilities do I have to test for synchronicity? e.g. times <- data.frame(year= c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), event.1=c(1, 0, 0, 1, 2, 4, 1, 0, 0, 0)

Re: [R] "which" command

2006-10-05 Thread Gavin Simpson
On Thu, 2006-10-05 at 16:57 -0400, AgusSusanto wrote: > I obtained error messages when I run these commands in UNIX, but I > obtained correct result when I run these command in WINDOWS. Can > somebody point out the problem and give the solution. Thanks. Not without Fall.dat I suspect. please re

[R] emacs-ess tab indentation

2006-10-05 Thread Ferdinand Alimadhi
Hi, I have a 2 tab-identation in my emacs-ess and I would like to make it 8. Can somebody help me with this ? thanks Johan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

Re: [R] "which" command

2006-10-05 Thread Don MacQueen
Are you sure Fall.dat is identical on both platforms, and that dt is also? Did you intend to ignore the cases where dt$V2 equals zero? Try, for example, table(which(dt[,2] == 0)) ## also ==1, ==2, ==3 unique( dt[which(dt[,2] == 0),5]## also ==1, ==2, ==3 unique( dt$V5 ) adding na

Re: [R] xyplot

2006-10-05 Thread Osman Al-Radi
Hello, Thanks for your answer, however, the resulting graph has two panels with a loess curve per subject. I need a single panel with a loess curve per group.. Osman On 10/5/06, Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote: > > > > Osman Al-Radi said the following on 10/5/2006 3:43 PM: > > Hi, > >

Re: [R] The W statistic in wilcox.exact

2006-10-05 Thread Christos Hatzis
Jue, On a second look, it appears that wilcox.test does report the offset-adjusted statistic U, as also mentioned in the help page. wilcox.test returns W=6 (instead of 12 as your example showed, unless "wilcox_test" is a different function). > wilcox.test( 1:5 ~ c(1,1,0,0,0) )$statistic # or wi

Re: [R] Writing Text into Plots

2006-10-05 Thread Lothar Botelho-Machado
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Duncan Murdoch wrote: > On 10/5/2006 4:10 PM, Lothar Botelho-Machado wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Hello, >> >> >> I have a simple question on the text() method in plots, e.g.: >> >> text(3,4,adj=1,cex=1.0, expression

Re: [R] How to get the function names

2006-10-05 Thread Jerome Asselin
On Thu, 2006-10-05 at 22:41 +0200, Søren Højsgaard wrote: > I've defined the function > > getFunNames <- function(FUN){ > if (!is.list(FUN)) > fun.names <- paste(deparse(substitute(FUN)), collapse = " ") > else > fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a)))

Re: [R] Matrix input problem

2006-10-05 Thread Duncan Murdoch
On 10/5/2006 4:52 PM, Bill Wyatt wrote: > Hi, > > Included is an R.script that came from a much large date set being > read in to R from a .txt file. Why is it that the first line codes with > an error, but the second line works fine? I get syntax errors on both, due to the missing comma at

Re: [R] xyplot

2006-10-05 Thread Deepayan Sarkar
On 10/5/06, Osman Al-Radi <[EMAIL PROTECTED]> wrote: > Hi, > > for the data below: > time<-c(rep(1:10,5)) > y<-time+rnorm(50,5,2) > subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) > group<-c(rep('A',30),rep('B',20)) > df<-data.frame(subject,group,time,y) > > I'd like to prod

Re: [R] How to get the function names

2006-10-05 Thread Duncan Murdoch
On 10/5/2006 4:41 PM, Søren Højsgaard wrote: > I've defined the function > > getFunNames <- function(FUN){ > if (!is.list(FUN)) > fun.names <- paste(deparse(substitute(FUN)), collapse = " ") > else > fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a))) > fun.names

[R] "which" command

2006-10-05 Thread AgusSusanto
I obtained error messages when I run these commands in UNIX, but I obtained correct result when I run these command in WINDOWS. Can somebody point out the problem and give the solution. Thanks. > dt<-read.table(file="Fall.dat") > dim(dt) [1] 19415 > table(dt$V2) 0 1 2 3 220 989 6

Re: [R] xyplot

2006-10-05 Thread Sundar Dorai-Raj
Osman Al-Radi said the following on 10/5/2006 3:43 PM: > Hi, > > for the data below: > time<-c(rep(1:10,5)) > y<-time+rnorm(50,5,2) > subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) > group<-c(rep('A',30),rep('B',20)) > df<-data.frame(subject,group,time,y) > > I'd like t

[R] Matrix input problem

2006-10-05 Thread Bill Wyatt
Hi, Included is an R.script that came from a much large date set being read in to R from a .txt file. Why is it that the first line codes with an error, but the second line works fine? Is there some line length limit in R? This happens at random places all through my data. Any help would be

[R] "which" command

2006-10-05 Thread AgusSusanto
I obtained error messages when I run these commands in UNIX, but I obtained correct result when I run these command in WINDOWS. Can somebody point out the problem and give the solution. Thanks. > dt<-read.table(file="Fall.dat") > dim(dt) [1] 19415 > table(dt$V2) 0 1 2 3 220 989 6

Re: [R] Writing Text into Plots

2006-10-05 Thread Marc Schwartz
On Thu, 2006-10-05 at 22:10 +0200, Lothar Botelho-Machado wrote: > Hello, > > > I have a simple question on the text() method in plots, e.g.: > > text(3,4,adj=1,cex=1.0, expression(alpha == beta)) > > I know there exists a lot more like frac(), etc which could be used for > expression. But a he

Re: [R] Writing Text into Plots

2006-10-05 Thread Duncan Murdoch
On 10/5/2006 4:10 PM, Lothar Botelho-Machado wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hello, > > > I have a simple question on the text() method in plots, e.g.: > > text(3,4,adj=1,cex=1.0, expression(alpha == beta)) > > I know there exists a lot more like frac(), etc which

[R] xyplot

2006-10-05 Thread Osman Al-Radi
Hi, for the data below: time<-c(rep(1:10,5)) y<-time+rnorm(50,5,2) subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10)) group<-c(rep('A',30),rep('B',20)) df<-data.frame(subject,group,time,y) I'd like to produce a plot with a single pannel with two loess curves one for each grou

Re: [R] The W statistic in wilcox.exact

2006-10-05 Thread Christos Hatzis
Probably because of the offset: U = W - n*(n+1)/2 In your example, W=12 (=3+4+5) as reported by wilcox.test. The offset is 6 (=3*4/2) and therefore U=6. I am not certain as I haven't installed the exactRankTests package, but it seems that wilcox.exact reports U instead of W. -Christos Hatzis

[R] How to get the function names

2006-10-05 Thread Søren Højsgaard
I've defined the function getFunNames <- function(FUN){ if (!is.list(FUN)) fun.names <- paste(deparse(substitute(FUN)), collapse = " ") else fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a))) fun.names } which gives what I want : > getFunNames(mean) [1] "mean"

Re: [R] R Graphics: Saving PDF and other formats from Windows Graphic Device for LaTeX

2006-10-05 Thread Mike Prager
Jens Scheidtmann <[EMAIL PROTECTED]> wrote: > Indispensable is having a good editing cycle. I.e. compile the latex, > jump to the position where you are editing the file in the preview, > double click somewhere in the preview, move to that position in your > editor (or at least near that positio

Re: [R] matrix multiplication

2006-10-05 Thread Ferdinand Alimadhi
Is this what you want ? > A1<-matrix(c(1,0,0,0,0,0,0,0,0),3) > A2<-matrix(c(1,0,0,0,1,0,0,0,0),3) > A3<-matrix(c(1,0,0,0,1,0,0,1,0),3) > X <- matrix(1:24,8) > XX<-list() > for(i in 1:3){ + XX[[i]]<-X%*%A[[i]] + } > XX [[1]] [,1] [,2] [,3] [1,]100 [2,]200 [3,]

[R] Writing Text into Plots

2006-10-05 Thread Lothar Botelho-Machado
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I have a simple question on the text() method in plots, e.g.: text(3,4,adj=1,cex=1.0, expression(alpha == beta)) I know there exists a lot more like frac(), etc which could be used for expression. But a help(frac) doesn't return any results

[R] Help on plot multiple plot(hexbin) in the same page

2006-10-05 Thread Li, Sue
Dear R-users, I try to plot multiple plots of hexbin in the same page. However, par does not work when hexbin is used. Neither do xlim and ylim. Any ideas? Thanks, Sue [[alternative HTML version deleted]] __ R-help@stat.math.ethz.ch mailing

Re: [R] littler release 0.0.6

2006-10-05 Thread Jeffrey Horner
For those of you who are littler fans, you'll be pleased to know that we've already decommissioned version 0.0.6 in light of the new and improved 0.0.7 (actually 0.0.6 was broken because of a missing file). You can get it from the links below. Jeff -- http://biostat.mc.vanderbilt.edu/JeffreyHo

Re: [R] R Graphics: Saving PDF and other formats from Windows Graphic Device for LaTeX

2006-10-05 Thread Jens Scheidtmann
Anupam Tyagi <[EMAIL PROTECTED]> writes: [...] > What is the best format to save R graphics for inclusion into a > LaTeX documents? When using pdflatex use pdf for graphics as reference format. Using ps2pdf or some such may have some problems when it comes to alpha channels and transparency. [.

[R] [R-pkgs] new package proptest

2006-10-05 Thread David Kraus
Dear R users, The package proptest (http://www.davidkraus.net/proptest/) has been recently released to CRAN. The package provides functions for testing the proportional hazards assumption in the Cox model for right censored survival data. Two types of tests for identifying nonproportional covaria

Re: [R] Plotting text with lattice

2006-10-05 Thread Gabor Grothendieck
I seem to have omitted g library(lattice) xyplot(x ~ x | g, data = data.frame(x = 1:12, g = gl(3,4)), panel = function(...) { panel.xyplot(...) panel.text(x=2, y=4, labels=which.packet()) }) On 10/5/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > This requires R 2.4.0. Its the

[R] Multivariate AR - prediction

2006-10-05 Thread Fleischer Alexander 0969 SPI
Hi, does anybody know how to predict a multivariate AR within R? If I just estimate a multi AR-object and plug it into predict I get an error from the aperm - just works for univariates. thx alex __ R-help@stat.math.ethz.ch mailing list https://stat.e

[R] The W statistic in wilcox.exact

2006-10-05 Thread Jue.Wang2
Does anyone know why wilcox.exact gives W-statistic 6 instead of 12 as indicated below. 12 is the rank sum of group 0 of x, which is the linear statistic computed by wilcox_test. y<-c(1,2,3,4,5) x<-c(1,1,0,0,0) (a) wilcox.exact wilcox.exact(y~x) Exact Wilcoxon rank sum test data: y by x W

Re: [R] Block comments in R?

2006-10-05 Thread BBands
+1 for Python style comments. """ your comments here and some more ... and some related info """ jab -- John Bollinger, CFA, CMT www.BollingerBands.com If you advance far enough, you arrive at the beginning. __ R-help@stat.math.ethz.ch mailing li

Re: [R] treatment effect at specific time point within mixedeffects model

2006-10-05 Thread Chuck Cleland
Afshartous, David wrote: > Hi Harold, > > Thanks for your response. > I'll check out p.224 in P&B, thanks. > > The null hypothesis is that there is no difference between say > A=[time=3, drug=I] > and B=[time=3, drug=P], or mu_A = mu_B. If the study is a crossover > design, i.e., > each patie

[R] convert day of week from number to character and include in lm

2006-10-05 Thread Spencer Jones
All, I am trying to include a day of week variable (1-7) in in a regression model. I would like to have the day of week treated as a categorical variable rather than a number the code looks like lm( dep ~ WKDY) I know this is a basic question, but help would be appreciated thanks spencer

[R] any package can visualize original affymetrix data?

2006-10-05 Thread Baoqiang Cao
Dear All, I'm thinking of visualizing the original binary data from affymetrix. Would you recommend any package? Not necessarily limited to R packages. Thanks! Best, -Cao __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listin

Re: [R] (not so real) function (more like #include)

2006-10-05 Thread Gabor Grothendieck
I thought of a few more possibilities. If options 1, 2 and 3 correspond to longfun, longfun2 and longfun3 then: 4. We could arrange it so that the variables are stored outside of longfun and then longfun, f1 and f2 reference them symmetrically. a <- b <- d <- 1 longfun4 <- function() { out <-

Re: [R] treatment effect at specific time point within mixedeffects model

2006-10-05 Thread Afshartous, David
Hi Harold, Thanks for your response. I'll check out p.224 in P&B, thanks. The null hypothesis is that there is no difference between say A=[time=3, drug=I] and B=[time=3, drug=P], or mu_A = mu_B. If the study is a crossover design, i.e., each patient receives drug=I and drug=P, I assume that

Re: [R] Block comments in R?

2006-10-05 Thread Gabor Grothendieck
There are two places that I find the current way it works to be less than ideal although its not that bad either: 1 .when one wants to define strings that have quotes then one must be careful to use double quoted strings to contain single quotes and single quoted strings to contain double quotes o

[R] mixed models: correlation between fixed and random effects??

2006-10-05 Thread Bruno L. Giordano
Hello, I built 4 mixed models using different data sets and standardized variables as predictors. In all the models each of the fixed effects has an associated random effect (same predictor). What I find is that fixed effects with larger (absolute) standardized parameter estimates have also a hi

Re: [R] Block comments in R?

2006-10-05 Thread Martin Maechler
> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]> > on Thu, 05 Oct 2006 11:13:03 -0400 writes: Duncan> On 10/5/2006 10:57 AM, Martin Maechler wrote: >> >> <## >> ... >> ##> >> >> but I'm not yet fond of the general idea. >> Martin Duncan> Is

[R] Fw: Bivariate Weibull distribution -- Copula

2006-10-05 Thread Jenny Stadt
I repost this in order for more responses. Thanks! From: Jenny Stadt Sent: 2006-10-04 16:49:33 To: r-help@stat.math.ethz.ch CC: Subject: [R] Bivariate Weibull distribution -- Copula Hi All, I am struggling in a bivariate Weibull distribution although I searched R-Site-Help and found sug

[R] unexpected behavior of boxplot(x, notch=TRUE, log="y")

2006-10-05 Thread bogdan romocea
A function I've been using for a while returned a surprising [to me, given the data] error recently: Error in plot.window(xlim, ylim, log, asp, ...) : Logarithmic axis must have positive limits After some digging I realized what was going on: x <- c(10460.97, 10808.67, 29499.98, 1, 35818

Re: [R] treatment effect at specific time point within mixedeffects model

2006-10-05 Thread Doran, Harold
Hi David: In looking at your original post it is a bit difficult to ascertain exactly what your null hypothesis was. That is, you want to assess whether there is a treatment effect at time 3, but compared to what. I think your second post clears this up. You should refer to pages 224- 225 of Pinhi

Re: [R] glm with nesting

2006-10-05 Thread Berton Gunter
Jeffrey: Please... May I repeat what Peter Dalgaard already said: consult a local statistician. The structure of your study is sufficiently complicated that your stat 101 training is inadequate. Get professional help, which this list is not set up to provide (though it often does, through the good

[R] lmer BIC changes between output and anova

2006-10-05 Thread Darren M. Ward
list, i am using lmer to fit multilevel models and trying to use anova to compare the models. however, whenever i run the anova, the AIC, BIC and loglik are different from the original model output- as below. can someone help me out with why this is happening? (i'm hoping the output assocait

Re: [R] Block comments in R?

2006-10-05 Thread Barry Rowlingson
Seth Falcon wrote: > > My wtf feature request is to add a multiline string delimiter ala > Python like """. > Anything that makes R more like Python syntax gets a +1 from me. How about getting rid of curly brackets for blocks and using indenting in R? Time to attack gram.y with a sledgeha

Re: [R] Plotting text with lattice

2006-10-05 Thread Gabor Grothendieck
This requires R 2.4.0. Its the same as my earlier example except the labels= arg has been changed to labels=which.packet(). xyplot(x ~ x | g, data = data.frame(x = 1:12), panel = function(...) { panel.xyplot(...) panel.text(x=2, y=4, labels=which.packet()) }) On 10/5/06, Ritwik

Re: [R] Block comments in R?

2006-10-05 Thread Duncan Murdoch
On 10/5/2006 10:57 AM, Martin Maechler wrote: > > <## > ... > ##> > > but I'm not yet fond of the general idea. > Martin Is that just because you don't need it, or that you see something objectionable in it? Duncan Murdoch __ R-help@st

Re: [R] treatment effect at specific time point within mixed effects model

2006-10-05 Thread Afshartous, David
Hi Spencer, Thanks for your reply. I don't think this answers my question. If I understand correctly, your model simply removes the intercept and thus the intercept in fm1 is the same as the first time factor in fm1a ... but am I confused as to why the other coefficient estimates are now differe

Re: [R] Block comments in R?

2006-10-05 Thread Martin Maechler
> "PD" == Peter Dalgaard <[EMAIL PROTECTED]> > on 05 Oct 2006 16:12:50 +0200 writes: PD> Seth Falcon <[EMAIL PROTECTED]> writes: >> Uwe Ligges <[EMAIL PROTECTED]> writes: >> > Use an editor that comments out a whole block which is what I do all the >> > time, e.g. use

Re: [R] Block comments in R?

2006-10-05 Thread hadley wickham
> Still gives you problems with nested comments. *IF* we want to go down > that route, we should have directional symbols like > > <<< > dsaldfysdfk > >>> What about heredocs? (http://en.wikipedia.org/wiki/Heredoc) Hadley __ R-help@stat.math.ethz.ch ma

Re: [R] Plotting text with lattice

2006-10-05 Thread Ritwik Sinha
Hi, On a related note, if I wanted to add different texts to different panels, should I stick to using trellis.focus() for each text in each panel? I cannot figure out a way to do it using a panel function. Ritwik. On 9/29/06, Deepayan Sarkar <[EMAIL PROTECTED]> wrote: > On 9/29/06, Gabor Grothe

Re: [R] glm with nesting

2006-10-05 Thread Jeffrey Stratford
Harold and list, I've changed a few things since the last time so I'm really starting from scratch. I start with bbmale <- read.csv("c:\\eabl\\2004\\feathers\\male_feathers2.csv", header=TRUE) box <-factor(box) chick <- factor(chick) Here's a sample of the data box,chick,julian,cltchsz,mrtot

Re: [R] Changes in console preferences won't take

2006-10-05 Thread Duncan Murdoch
On 10/5/2006 9:41 AM, David Kaplan wrote: > Greetings, > > I've attempted to change the font size directly in Rconsole as well as > through the GUI preferences. Neither seems to take even when I save the > preference changes. When I make the change through the gui preference, > and click "app

[R] matrix multiplication

2006-10-05 Thread Ya-Hsiu Chuang
Dear all, I have 2 matrices, one is a 8x3 matrix, called X; the other matrix is a 3x3 indicator matrix with the diagonal element as 0 or 1. when a variable is included in the model, the corresponding diagonal element is 1, otherwise, it is 0. Let A be a set of matrices that contain the possibl

Re: [R] Block comments in R?

2006-10-05 Thread Peter Dalgaard
Seth Falcon <[EMAIL PROTECTED]> writes: > Uwe Ligges <[EMAIL PROTECTED]> writes: > > Use an editor that comments out a whole block which is what I do all the > > time, e.g. use Tinn-R, Emacs or WinEdt, to mention just a few of > > them. > > This, of course, works. The if(FALSE) approach does no

Re: [R] warning message in nlm

2006-10-05 Thread Spencer Graves
Without 'msc39', I can't say for sure, but I doubt if it's anything to worry about. It looks like 'nlm' tests values for theta and len that produce either NA or Inf in computing 'loglikcs'. Since you got an answer, it does not look to me like it's anything worth worrying about; just ma

Re: [R] Partition into quantiles

2006-10-05 Thread Alberto Monteiro
Sorry, folks. Thanks for the help, but none of the suggestions worked quite as I wanted :-/ So I wrote the code. It seems to work: gera_particao <- function(x, n) { y <- sort(x) icut <- as.integer(seq(1, length(x)+1, length = n + 1)) icut <- icut[c(-(n+1))] ycut <- y[icut] for (i in 1:

[R] research

2006-10-05 Thread aziz tomi
dear sir iam algerian student iam 30 years old i finished my postgraduate in applied economic and statistics .i prepare my doctorat about effect of kyoto protocol on our economic. i need the document and the articals and the adress of doctor in this domain in your university i shal

Re: [R] Partition into quantiles

2006-10-05 Thread Frank E Harrell Jr
David Barron wrote: > You might also want to look at the function quantcut in the gtools > package (part of the gregmisc bundle). Also, cut2 in Hmisc will do this and will label the intervals compactly. Frank > > > > On 05/10/06, Alberto Monteiro <[EMAIL PROTECTED]> wrote: >> Is there any fun

Re: [R] Block comments in R?

2006-10-05 Thread Seth Falcon
Uwe Ligges <[EMAIL PROTECTED]> writes: > Use an editor that comments out a whole block which is what I do all the > time, e.g. use Tinn-R, Emacs or WinEdt, to mention just a few of > them. This, of course, works. The if(FALSE) approach does not because it requires the "comment" to be syntactical

[R] Changes in console preferences won't take

2006-10-05 Thread David Kaplan
Greetings, I've attempted to change the font size directly in Rconsole as well as through the GUI preferences. Neither seems to take even when I save the preference changes. When I make the change through the gui preference, and click "apply" the change is made, but when I save it, close, and

Re: [R] glm with nesting

2006-10-05 Thread Doran, Harold
It's not really possible to help without knowing what errors you received and maybe some reproducible code. I think I remember this, though. From what I recall, there was no distinction between box and chick, so you cannot estimate both variance components. > -Original Message- > From:

Re: [R] [Fwd: Re: Block comments in R?]

2006-10-05 Thread Duncan Murdoch
On 2006-10-5 9:20, Barry Rowlingson wrote: > Philippe Grosjean wrote: > >> >> It takes advantage of `!` being not defined for character arguments: >> > > *gasp* > > how much R code is destined to feature on www.thedailywtf.com in the > future? > > whats the chances of block commenting

Re: [R] glm with nesting

2006-10-05 Thread Jeffrey Stratford
Peter and list, Thanks for the response. A did add box as a factor (box <- factor(box)). Julian should be linear - bluebird chicks are bluer as the season progresses from March to August. I did try the following rtot.lme <- lmer(rtot ~ sex +(purban|box:chick) + (purban|box), data=bb, na.acti

Re: [R] [Fwd: Re: Block comments in R?]

2006-10-05 Thread Barry Rowlingson
Philippe Grosjean wrote: > > It takes advantage of `!` being not defined for character arguments: > *gasp* how much R code is destined to feature on www.thedailywtf.com in the future? whats the chances of block commenting being included in a future version? and more generally, is ther

Re: [R] Partition into quantiles

2006-10-05 Thread David Barron
You might also want to look at the function quantcut in the gtools package (part of the gregmisc bundle). On 05/10/06, Alberto Monteiro <[EMAIL PROTECTED]> wrote: > Is there any function that divides a sample into N quantiles? > > For example, for N = 2, this would be the solution: > > x <- rnor

Re: [R] Partition into quantiles

2006-10-05 Thread Richard M. Heiberger
cut.quantile <- function(x, N, use.ppoints=TRUE) { qq <- if (use.ppoints) c(0,ppoints(N-1),1) else seq(0, 1, 1/N) breaks <- quantile(x, qq) breaks[1] <- breaks[1] - 1 breaks[N+1] <- breaks[N+1]+1 cut(x, breaks) } tmpT <- cut.quantile(rnorm(100), 10, TRUE) table(tmpT) tmpF <- cut.quant

Re: [R] Partition into quantiles

2006-10-05 Thread Peter Dalgaard
"Alberto Monteiro" <[EMAIL PROTECTED]> writes: > Is there any function that divides a sample into N quantiles? > > For example, for N = 2, this would be the solution: > > x <- rnorm(100) > m <- median(x) > q <- ifelse(x <= median, 1, 2) Have a look at > N <- 2 > table(cut(x,quantile(x,seq(0,1,

[R] Partition into quantiles

2006-10-05 Thread Alberto Monteiro
Is there any function that divides a sample into N quantiles? For example, for N = 2, this would be the solution: x <- rnorm(100) m <- median(x) q <- ifelse(x <= median, 1, 2) Alberto Monteiro __ R-help@stat.math.ethz.ch mailing list https://stat.ethz

[R] [Fwd: Re: Block comments in R?]

2006-10-05 Thread Philippe Grosjean
Ooops! Sorry, I send it only to Uwe Ligges the first time. Best, Philippe Grosjean This is perhaps another solution, more elegant in the way the block comment is written... but it requires to redefine `!` and slows it a little bit because it tests first its arguments before calling .Primitive(!):

Re: [R] glm with nesting

2006-10-05 Thread Peter Dalgaard
"Jeffrey Stratford" <[EMAIL PROTECTED]> writes: > I just had a manuscript returned with the biggest problem being the > analysis. Instead of using principal components in a regression I've > been asked to analyze a few variables separately. So that's what I'm > doing. > I pulled a feather from

[R] glm with nesting

2006-10-05 Thread Jeffrey Stratford
I just had a manuscript returned with the biggest problem being the analysis. Instead of using principal components in a regression I've been asked to analyze a few variables separately. So that's what I'm doing. I pulled a feather from young birds and we quantified certain aspects of the color o

[R] format of data for use in clim.pact

2006-10-05 Thread isidora k
Goodmorning everyone! Just a quick question: I want to apply eof analysis and downscaling using the clim.pact package. What form should my data have? Only netCDF? Right now my data are of the form of ascii files for each month with 3 columns corresponding to latitude, longitude and value of my obs

Re: [R] VGAM Package ?

2006-10-05 Thread Gavin Simpson
On Thu, 2006-10-05 at 11:39 +0200, KOITA Lassana - STAC/ACE wrote: > > > > Hi! R users > I would like to ask you where could we find the VGAM Package. I don't find > it in the list of packages. > > Thak you for your help > > > Lassana KOITA That's because it isn't on CRAN yet. You can find

Re: [R] Variables in RODBC environment

2006-10-05 Thread Bonfigli Sandro
> how can I use variables in the RODBC environment. > > Example which does not work: > > Thanks for your help. > > Thorsten > > pn <- '39R5238'; > > library(RODBC); > odbcobj <- odbcConnect("SQUIT21C",uid="muehge",pwd="xxx"); > sql <- "select > u.unitid, > from test > where part in ('pn') > "

Re: [R] (not so real) function (more like #include)

2006-10-05 Thread Meinhard Ploner
Thanks a lot! longfun2 & longfun3 work perfect for my "very untypical" problem. As I have many local variables, usual functions with parameters are very uncomfortable, but the code you gave me is great! Meinhard On Oct 4, 2006, at 5:25 PM, Gabor Grothendieck wrote: > longfun could just pas

Re: [R] VGAM Package ?

2006-10-05 Thread David Scott
google VGAM On Thu, 5 Oct 2006, KOITA Lassana - STAC/ACE wrote: Hi! R users I would like to ask you where could we find the VGAM Package. I don't find it in the list of packages. Thak you for your help Lassana KOITA Etudes de Sécurité et d'Exploitation aéroportuaires / Safety Study &

[R] VGAM Package ?

2006-10-05 Thread KOITA Lassana - STAC/ACE
Hi! R users I would like to ask you where could we find the VGAM Package. I don't find it in the list of packages. Thak you for your help Lassana KOITA Etudes de Sécurité et d'Exploitation aéroportuaires / Safety Study & Statistical analysis Service Technique de l'Aviation Civile (STAC) / C

Re: [R] Variables in RODBC environment

2006-10-05 Thread Søren Merser
hi, use paste: # a string/number/date pn <- '39R5238'; sql <- paste("select u.unitid from test where part =", pn) ^^ # an array of strings/numbers/dates pn=c(1,2,3,4) sql <- paste("select u.unitid from test where part in (",

Re: [R] searching for data.frame rows / processing of rows

2006-10-05 Thread chao gai
I tought that aggregate was the way to go, but only for large dataframes it is faster. > df <- read.table(stdin(),header=TRUE) 0: Location TimeXY 1: 1 0 1.6 9.3 2: 1 3 4.2 10.4 3: 1 6 2.7 16.3 4: 2 0 0.5 2.1 5: 2

Re: [R] Block comments in R?

2006-10-05 Thread Uwe Ligges
Robin Hankin wrote: > > On 5 Oct 2006, at 10:05, Uwe Ligges wrote: > >> >> >> Wee-Jin Goh wrote: >>> Hello list, >>> >>> Is there any way to perform a block comment in R? In C++, anything in >>> between a /* and */ is considered a comment, and it allows >>> programmers to comment out chunks of

  1   2   >