Re: [R] documented (was surprising) dates

2006-06-04 Thread Prof Brian Ripley
On Sat, 3 Jun 2006, ivo welch wrote: I wonder if this is an intentional feature or an oversight. These are documented properties of the functions you are using. in some column summaries or in ifelse operations, apparently I am losing the date property of my vector. a - c(198012, 198101,

Re: [R] difference in behavior between batch and source

2006-06-04 Thread Prof Brian Ripley
There is a documented limit of 1000 bytes on R input lines. You are probably hitting it. Try teaching your Python code generator to wrap lines. NB: input means input from the console or stdin, not to the parser. The front-end is asked for a line of up to 1000 bytes. Some front-ends may

Re: [R] text bubble (rectangle)?

2006-06-04 Thread Peter Dalgaard
ivo welch [EMAIL PROTECTED] writes: Dear R wizards: sorry to bug everyone twice in one day. I would like to annotate my graph by putting text strings into rectangle boxes with a little cartoon-like bubble with a lid pointing to a specific location. I can draw some sort of bubble-with-lid

[R] How to use lmer function and multicomp package?

2006-06-04 Thread Giovanni Bacaro
Dear list members, First of all thank you for your helpful advices. After your answeres to my firt mail I studied a lot (R-News n°5) and I tried to perform my analysis: First, to fit a GLM with a nested design I decided to use the function lmer in package lme4 as suggested by Spencer Graves and

[R] logistic regression enquiry

2006-06-04 Thread Bob Green
I am hoping for some advie regarding the following scenario. I have data from 26 studies that I wanted to analyse using logistic regression. Given the data was from studies and not individuals I was unsure how I would perform this in R. When analysed in SPSS, weighting was used so that each

Re: [R] logistic regression enquiry

2006-06-04 Thread John Fox
Dear Bob, If I follow this properly, this is just a binomial logistic regression, where, for each of your 26 observations, you have a certain number of successes (positive instances) and failures (negative ones). Fitting a binomial logit model is easily accommodated by the glm() function.

Re: [R] How to call a value labels attribute?

2006-06-04 Thread Heinz Tuechler
At 14:12 03.06.2006 +0200, Martin Maechler wrote: Heinz == Heinz Tuechler [EMAIL PROTECTED] on Tue, 23 May 2006 01:17:21 +0100 writes: Heinz Dear All, after searching on CRAN I got the Heinz impression that there is no standard way in R to Heinz label values of a numerical

Re: [R] How to use lmer function and multicomp package?

2006-06-04 Thread Doran, Harold
Comments below: mod1-lmer(sp~cla+(1|cla:plotti), data=bacaro, family=poisson(link=log)) summary(mod1) #sunto del modello Generalized linear mixed model fit using PQL Formula: sp ~ cla + (1 | cla:plotti) Data: bacaro Family: poisson(log link) AIC BIC

Re: [R] How to call a value labels attribute?

2006-06-04 Thread Dimitrios Rizopoulos
maybe you could consider something like the following: varlabs - function(x){ if (is.null(names(x))) NULL else x[!duplicated(x)] } varlabs- - function(x, value){ names(x) - names(value[x]) x } ### x - c(1, 2, 3, 3, 2, 3, 1) x varlabs(x) varlabs(x) - c(apple=1, banana=2,

[R] slanted ends of horizontal lines for certain line widths

2006-06-04 Thread Robert Offinger
Hello, if I plot a horizontal line, e.g., plot(c(1,2),c(1,1),xlim=c(0,3),lwd=2,type=l) or plot(c(1,2),c(1,1),xlim=c(0,3),lwd=4,type=l) then the left end (1st example) or both ends (2nd example) of the lines are not rectangular but slanted on the graphical display (screen). That behavour

[R] Problems using lwd in GDD

2006-06-04 Thread Luiz Rodrigo Tozzi
hi I'm using the GDD package (in a 64bits fedora machine using R 2.3.0) to save in a png file some plots and i noticed that changing the lwd parameter does not change my line width I tried the same script in a Windows based R ( 2.2.1 r36812), using no GDD, and it worked. Does anybody has a

[R] Significance test, Cronbach's Alpha

2006-06-04 Thread Tom Backer Johnsen
Hello: I am reading a paper at the moment where the author reports on a significance test of Cronbach's Alpha. I did not know that it is possible. Is it? If so, how? Tom ++ | Tom Backer Johnsen, Psychometrics Unit, Faculty of

Re: [R] slanted ends of horizontal lines for certain line widths

2006-06-04 Thread Charles Annis, P.E.
I think you want to change par()$lend Type par() enter to see the defaults. In your situation you might want to begin with something like dev.off() par(mar=c(4,6,4,5)+0.1, lend=2) ... then your plotting logic ... Where the mar argument adjusts the margins. (You can omit this if you're

Re: [R] slanted ends of horizontal lines for certain line widths

2006-06-04 Thread Dimitrios Rizopoulos
probably you want to look at the `lend' argument of ?par, e.g., op - par(lend = 2) plot(c(1,2), c(1,1), xlim = c(0,3), lwd = 20, type = l) par(op) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of Leuven

[R] Fwd: Re: How to call a value labels attribute?

2006-06-04 Thread Richard M. Heiberger
How is what you are doing any different from factors? x - factor(c(1, 2, 3, 3, 2, 3, 1), labels=c(apple, banana, other)) x [1] apple banana other other banana other apple Levels: apple banana other as.numeric(x) [1] 1 2 3 3 2 3 1 levels(x)[3] - birne x [1] apple banana birne birne

[R] strange (to me) ncolumns default value in 'write'

2006-06-04 Thread Antonio, Fabio Di Narzo
Hi all. In 'write' documentation, one can read: write(x, file = data, ncolumns = if(is.character(x)) 1 else 5, append = FALSE, sep = ) Now my question is: why the default value of 1column for character vectors and the special value '5' for non character vectors? Nice sunday to all,

Re: [R] slanted ends of horizontal lines for certain line widths

2006-06-04 Thread Robert Offinger
Thanks a lot! That was exactly what I was looking for. By the way, I see that since R version 2.3.0 that can be specified inline, i.e., plot(c(1,2), c(1,1), xlim=c(0,3), lwd=10, type=l, lend=2) So no need for par()... Dimitrios Rizopoulos wrote: probably you want to look at the `lend'

Re: [R] why does arima returns NAN standard error?

2006-06-04 Thread Spencer Graves
Your question does not include a simple, self-contained example (as requested in the posting guide! www.R-project.org/posting-guide.html). Without that, I don't even know where to start. However, the model appears to be overparameterized and NOT invertible. Have you made acf and

[R] evaluation of the alternative expression in ifelse

2006-06-04 Thread Renaud Lancelot
Dear all, I am trying to avoid the warnings produced by: x - -2:2 log(x) [1] NaN NaN -Inf 0.000 0.6931472 Warning message: production de NaN in: log(x) I thought that using ifelse would be a solution, but it is not the case: ifelse(test = x 0, yes = NaN, no = log(x))

Re: [R] evaluation of the alternative expression in ifelse

2006-06-04 Thread Dimitrios Rizopoulos
Quoting Renaud Lancelot [EMAIL PROTECTED]: Dear all, I am trying to avoid the warnings produced by: x - -2:2 log(x) [1] NaN NaN -Inf 0.000 0.6931472 Warning message: production de NaN in: log(x) I thought that using ifelse would be a solution, but it is not

Re: [R] evaluation of the alternative expression in ifelse

2006-06-04 Thread Gabor Grothendieck
Try: log(ifelse(x 0, NaN, x)) or suppressWarnings(ifelse(x 0, NaN, log(x))) or ifelse(x 0, NaN, log(pmax(0, x))) On 6/4/06, Renaud Lancelot [EMAIL PROTECTED] wrote: Dear all, I am trying to avoid the warnings produced by: x - -2:2 log(x) [1] NaN NaN -Inf

Re: [R] understanding the verbose output in nlme

2006-06-04 Thread Spencer Graves
I don't know, but if it were my question, I think I could find out by making local copies of the functions involved and stepping through the algorithm line by line using debug (see, e.g., http://finzi.psych.upenn.edu/R/Rhelp02a/archive/68215.html;). Have you read Pinheiro and

Re: [R] help with syntax of nlme function

2006-06-04 Thread Spencer Graves
I haven't seen a reply to this, so I will offer a few comments. I'm not sufficiently familiar with nlme to answer your question directly, but I hope my comments might help. First, have you studied Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer)?

[R] Nested and repeated effects together?

2006-06-04 Thread Stephan Kolassa
Dear R people, I am having a problem with modeling the following SAS code in R: Class ID Gr Hemi Region Gender Model Y = Gr Region Hemi Gender Gr*Hemi Gr*Region Hemi*Region Gender*Region Gender*Hemi Gr*Hemi*Region Gender*Hemi*Region Gr*Gender*Hemi*Region Random Intercept Region Hemi /Subject =

Re: [R] date sequencing using the Fcalendar package

2006-06-04 Thread Spencer Graves
Have you reviewed White Paper on timeDate / timeSeries downloadable from www.rmetrics.org? I believe this should answer your question. It is my understanding that fCalendar was designed to help people coordinate trading times and dates between different financial markets all around

Re: [R] setting the random-effects covariance matrix in lme

2006-06-04 Thread Spencer Graves
I haven't seen a reply to this post, so I will offer a few comments. I don't know off the top of my head how to do what you want, but I believe it can be done. Are you aware that the standard R distribution includes script files containing nearly all the R commands

Re: [R] predict function does not provide SE estimates for multivariate timeseries VAR models?

2006-06-04 Thread Spencer Graves
The dse2 package contains functions forecast and forecastCov. Have you tried them? There may be functions to estimate vector autoregressive models in more than one package in R. If you'd like more help from this listserve, I would encourage you to submit another post after

[R] Extracting Variance components

2006-06-04 Thread Murray Jorgensen
I can ask my question using and example from Chapter 1 of Pinheiro Bates. # 1.4 An Analysis of Covariance Model OrthoFem - Orthodont[ Orthodont$Sex == Female, ] fm1OrthF - + lme( distance ~ age, data = OrthoFem, random = ~ 1 | Subject ) summary( fm1OrthF ) Linear mixed-effects model

[R] Tcltk Default Background Color Question

2006-06-04 Thread Crimson Turquoise
Hello, I am new at tcltk and would like to identify the default background color for widgets. I have found things like systemBackground or tk_setPalette, but am not able to get them to work in R. Is there a name for this color such as lightgray, etc? Thank you for your time.

Re: [R] Extracting Variance components

2006-06-04 Thread Andrew Robinson
Murray, you'll find it in VarCorr(fm1OrthF) Cheers Andrew On Mon, Jun 05, 2006 at 04:29:48PM +1200, Murray Jorgensen wrote: I can ask my question using and example from Chapter 1 of Pinheiro Bates. # 1.4 An Analysis of Covariance Model OrthoFem - Orthodont[ Orthodont$Sex ==

[R] Functions starting with underscores

2006-06-04 Thread Joseph Wang
I'm having problems with functions starting with underscores '_foo' - function(x) {1} seems to work but I can't assign an attribute to this function attr('_foo', 'bar') - 'pow' Any way of doing this? This is for a C++ - R wrapping system so I'd like to keep the C++ names which start with