Re: [Rd] Precision of function mean,bug?

2020-05-20 Thread peter dalgaard
_____ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email:

Re: [Rd] proposed change to 'sample'

2010-06-20 Thread Peter Dalgaard
it? I.e., you still cannot conveniently sample from a vector that is possibly of size 1. I would be more inclined to make sampling from a vector the normal case, and default x to say 1:max(n, size), forcing users to say sample(n=5) if sampling from x=1:5 is desired. This could be a manageable change

Re: [Rd] proposed change to 'sample'

2010-06-20 Thread Peter Dalgaard
some code, but I'd expect not all that much. However, it cannot be changed in one go, we'd need to go through a sequence where we (e.g.) 1. warn about length(x)==1 2. say that length(x)==1 is deprecated 3. have length(x)==1 throw an error 4. wait 5. give length(x)==1 a new meaning

Re: [Rd] [R] New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())

2010-06-22 Thread Peter Dalgaard
> difftime objects to be numeric in 2.11.1, when the code's been working > fine before and the error messages are obscure. I don't think you realize the problems that could occur by assuming that difftime objects are numerics ON ANY PARTICULAR SCALE! -- Peter Dalgaard Center for

Re: [Rd] seek() and gzfile() on 32-bit R2.12.0 in linux

2010-06-23 Thread Peter Dalgaard
) >> close(zz) >> blah = file("ex.data", "r") >> seek(blah) > [1] 0 >> zz <- gzfile("ex.gz", "w") # compressed file >> cat("TITLE extra line", "2 3 5 7", "", "11 13 17"

Re: [Rd] Possible bug in 2.11.x texmf makefile.in and some related things...

2010-07-05 Thread Peter Dalgaard
et file instead of the source. (Just ask the editor of The R Journal how easy it is to remember to edit RJournal.dtx and not RJournal.sty...) -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __

Re: [Rd] Strange R object

2010-07-09 Thread Peter Dalgaard
is not too strange that you can have an ill-formed .Rdata file (if you save zz2 back out, after the above fixup, line 11 changes from 526 to 782, corresponding to the bit being turned on). I don't think it is the job of load() to verify object structures, since there is no end to that task. Rat

Re: [Rd] Strange R object

2010-07-09 Thread Peter Dalgaard
Gabor Grothendieck wrote: > On Fri, Jul 9, 2010 at 5:09 AM, Peter Dalgaard wrote: >> Gabor Grothendieck wrote: >>> I have *** attached *** an RData file containing an R object that >>> is acting strangely. >>> >>> Try this in a fresh workspace. Do n

Re: [Rd] re ading SPSS .sav files (PR#13509)

2010-07-17 Thread Peter Dalgaard
I have tried so may times running some conditions I think may have caused > these errors to recur(including re-installing the R). > > > > I am at my wit's end on how to make the read.spss work. Please help! It's a warning, not an error. Did you not get a result retu

Re: [Rd] garbage collection & memory leaks in 'R', it seems...

2010-07-17 Thread Peter Dalgaard
st languages that do significant amounts of object allocation and destruction. You should not really compare it to OS level memory management because that's a different kettle of fish. In particular, user programs like R relies on having all objects mapped to a single linear address space, whereas th

Re: [Rd] problem with zero-weighted observations in predict.lm?

2010-07-27 Thread Peter Dalgaard
nlines > length(pb) <- nlines > pb[is.na(pb)] <- "" > pa[is.na(pa)] <- "" > retval <- cbind(pa, pb, deparse.level = 0) > dimnames(retval) <- list(rep("",nrow(retval)), argNames) > noquote(retval) > } > > # lw

Re: [Rd] problem with zero-weighted observations in predict.lm?

2010-07-28 Thread Peter Dalgaard
Peter Dalgaard wrote: > William Dunlap wrote: >> In modelling functions some people like to use >> a weight of 0 to drop an observation instead of >> using a subset value of FALSE. E.g., >> weights=c(0,1,1,...) >> instead of >> subset=c(FALSE, TRUE, TRUE

Re: [Rd] problem with zero-weighted observations in predict.lm?

2010-07-29 Thread Peter Dalgaard
lt;- n - p Yes, that seems to fix things. Will commit to R-devel shortly. -p -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing lis

Re: [Rd] problem with zero-weighted observations in predict.lm?

2010-07-29 Thread Peter Dalgaard
Peter Dalgaard wrote: > Prof Brian Ripley wrote: > >> I think you will find that 'n' is used in several ways in predict.lm, >> and since NA-handling was introduced in R 1.8.0 they may differ in >> value. So the safest route seems to be to change just &#x

Re: [Rd] problem with zero-weighted observations in predict.lm?

2010-07-29 Thread peter dalgaard
I believe that I now has this nailed down (a couple of further issues raised their head). Committed to r-devel. -pd On Jul 29, 2010, at 10:11 AM, Peter Dalgaard wrote: > Peter Dalgaard wrote: >> Prof Brian Ripley wrote: >> >>> I think you will find that '

Re: [Rd] transpose of complex matrices in R

2010-07-30 Thread peter dalgaard
called "adjoint". So another option is to use adj(A) for what you call myt(A), and then just remember to transcribe A^* to adj(A). I forget whether the cross products A^*A and AA^* have any special names in abstract linear algebra/functional analysis. -- Peter Dalgaard Center fo

Re: [Rd] R CMD build wiped my computer (from R-help)

2010-08-01 Thread Peter Dalgaard
on my systems, >>>>>> hourly. >>>>>> >>>>>> HTH, >>>>>> >>>>>> Marc Schwartz >>>>>> >>>>>> On Jul 28, 2010, at 5:55 AM, Jarrod Hadfield wrote: >>>>>>>

Re: [Rd] suggestion for ?factor

2010-08-09 Thread peter dalgaard
er(x) that is matched against the level set, but I'm not sure it is the right place for that. > > With thanks, > Ted. > > ---- > E-Mail: (Ted Harding) > Fax-to-email: +44 (0)870 094 0861 > Date: 09-Aug-10

Re: [Rd] accessing tcl variables within R and tcl

2010-08-12 Thread Peter Dalgaard
R and tcl. > > Thanks for any help, Ow, that's been a while... However tcl('test', tclvalue(a)) seems to do the trick, as does tcl('test', tclObj(a)) The latter presumably being preferable, since it avoids conversion to and from an R object. If I re

Re: [Rd] adding a built-in drop.levels option for subset() in 2.12 ?

2010-08-15 Thread Peter Dalgaard
d less wide-ranging than a global > drop.unused.levels option, or than convincing everyone to use strings > rather than factors most of the time ... > > cheers > Ben Bolker > > -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] One possible cause for incorrect symbols in X11() output

2010-08-19 Thread peter dalgaard
nly not to work, and even disregarding the pi issue, the rotated y-axis labels come out pretty ugly. This is why quartz is now the default on OSX. BTW, it seems that the standard X11 "Symbol","Regular" font is simply absent on OSX. I can't get fc-match to list

Re: [Rd] One possible cause for incorrect symbols in X11() output

2010-08-19 Thread peter dalgaard
On Aug 19, 2010, at 1:04 PM, Prof Brian Ripley wrote: > On Thu, 19 Aug 2010, peter dalgaard wrote: > >> >> On Aug 19, 2010, at 9:15 AM, Jari Oksanen wrote: >> >> >>> >>> The X11(type = 'cairo') shows the problem with example(points)

Re: [Rd] One possible cause for incorrect symbols in X11() output

2010-08-19 Thread peter dalgaard
On Aug 19, 2010, at 1:55 PM, peter dalgaard wrote: >> >> It is also not using pango, and so not selecting fonts the same way as on >> Linux. > > You're assuming (in fact, correctly) that I was using Simon's build, but my > locally built version is simi

Re: [Rd] adding a built-in drop.levels option for subset() in 2.12 ?

2010-08-23 Thread peter dalgaard
preserve backward > compatibility/efficiency) to the subset function ... ? > If not, would a patch to the documentation and/or the R FAQ be accepted? Ben, there is now a dropLevels() _function_ in R-devel, please try it on for size. -- Peter Dalgaard Center for Statistics, Copenhagen Business

Re: [Rd] Is it safe not to coerce matrices with as.double() in .C()?

2010-08-27 Thread peter dalgaard
avoid duplicating things you won't be modifying anyway, etc. > > Best, > Andy > Notice: This e-mail message, together with any attachme...{{dropped:14}} > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch

Re: [Rd] Surprising behavior of Negate()

2010-08-29 Thread Peter Dalgaard
ic lazy eval gotcha -- almost never intentional. Testing your patch now. -p -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list h

Re: [Rd] R and Epi Info

2010-09-01 Thread peter dalgaard
ut I know that at least some of the regulars are familiar with Epi Info and the list includes the authors of several R packages for epidemiology. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd..

Re: [Rd] Drop single-dimensional array

2010-09-08 Thread Peter Dalgaard
that this is perhaps not a clear >>> bug, but somewhat unclear behavior. >>> >>> The most compact way to break the vector out of its eggshell seems to >>> be >>> >>> t(x)[,] >>> >>> but drop(x) would be much easier to read an

Re: [Rd] A couple of typos in ?pairwise.t.test

2010-09-10 Thread peter dalgaard
; Regards, > > Marc Schwartz > > > > > ______ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard Center for Statistics, Copenhagen Busine

Re: [Rd] More strange R CMD build/check errors on Windows

2010-09-12 Thread Peter Dalgaard
already ruled that out, but it has been the culprit for problems with mysteriously disappearing intermediate files in several cases, so I thought I'd mention it. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda..

Re: [Rd] value returned by by()

2010-09-15 Thread peter dalgaard
ill be a list, though.) Notice that in the relevant cases, what you get really _is_ a list, and both walks and quacks like one. E.g. > L <- with(warpbreaks, by(warpbreaks[, 1], tension, mean, simplify=FALSE)) > is.list(L) [1] TRUE > L$M [1] 26.38889 -- Peter Dalgaard Cen

Re: [Rd] a small suggestion for improving the building of packages

2010-09-15 Thread peter dalgaard
ory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable. There is another theory which states that this has already happened. -- Peter Dalgaard Center for Statist

Re: [Rd] License of R manuals

2010-09-29 Thread Peter Dalgaard
_ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [Rd] Assignment to a slot in an S4 object in a list seems to violate copy rules?

2010-09-30 Thread peter dalgaard
g, not an obscure corner case): r52914 | luke | 2010-09-15 19:06:13 +0200 (Wed, 15 Sep 2010) | 4 lines Modified applydefine to duplicate if necessary to ensure that the assignment target in calls to assignment functions via the complex assignment mechanism always has NAMED == 1. -- Pet

Re: [Rd] R-beta_2010-10-02_r53128 fails to compile on FreeBSD

2010-10-03 Thread Peter Dalgaard
code 1 > Stop in /usr/local/R-beta. > - > > Is this a known error? I would really appreciate if someone could give > me a hint. > > Please let me know if more information is needed. > > Thanks in advance, > Rainer Hurling > >

Re: [Rd] R-beta_2010-10-02_r53128 fails to compile on FreeBSD

2010-10-03 Thread Peter Dalgaard
H #include #endif somewhere at the top of the files that use the two macros (sysutils.c and sys-unix.c AFAICS). "&& defined(WEXITSTATUS)" probably won't break anything that wasn't already broken, but it does insert a default definition that could conflict

Re: [Rd] Recursion error after upgrade to R_2.11.1 [Sec=Unclassified] [Sec=Unclassified]

2010-10-07 Thread Peter Dalgaard
ed in your feedback. By a curious coincidence, the prerelease crontab had the same typo ... 02 00 1 10 * $HOME/scripts/R-set-version '2.12.0 beta' 02 00 8 10 * $HOME/scripts/R-set-version '2.12.2 RC' Fortunately, I saw the mail with a failing prerelease build before going to b

Re: [Rd] What do you call the value that represents a missing argument?

2010-10-09 Thread Peter Dalgaard
t;- y Error: argument "y" is missing, with no default (I have forgotten whether there's a reason that the above doesn't fail already on the assignment to y. Somehow it would have been more logical if missing values could _only_ appear inside lists. Except in actual function arguments

Re: [Rd] make error for R 2.13.0 (and 2.12.0)

2010-10-18 Thread Peter Dalgaard
; --enable-targets=all --enable-checking=release --build=i486-linux-gnu > --host=i486-linux-gnu --target=i486-linux-gnu > Thread model: posix > gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu4) > > This R-2.12.0 installation generally works (based on testing a few > trivial things).

Re: [Rd] new.env does not recognize parents from subclassesof "environment"

2010-10-23 Thread Peter Dalgaard
tched and R-devel >> tar balls ? >> >> Or what were you talking about ? > > We are talking about the > > http://stat.ethz.ch/R-manual/ > > page. R-devel NEWS show R-2.12.0, just as on example. > > Uwe > You need to get NEWS from $BUILDDIR these days. A

Re: [Rd] "$<-" fails (invalid subscript type 'language')

2010-10-24 Thread Peter Dalgaard
nt in my S4 method, because it's not even entered. There are some things you are not really supposed to mess with in R... Computing the index to $-constructs is one of them (trying to set up a for loop as a call to `for` is another). It can be done, it&#

Re: [Rd] Evaluation puzzle

2010-11-11 Thread Peter Dalgaard
ex+year", data = mydata) Browse[1]> ls() [1] "mydata" "zed" Browse[1]> tfun function(mydata) { zed <- 100 + (1:nrow(mydata)) * 20 survexp.test(zed ~ 1, data=mydata) } -- Peter Dalgaard Center for Statistics, Copenhagen Business School Phone: (

Re: [Rd] Bug in read.table?

2010-11-16 Thread peter dalgaard
ead > and report it as such, or would someone explain why it's not a bug? > I think it can be defended to file as a bug, but it is tricky to pinpoint exactly what the issue is. E.g., notice that adding a few spaces changes the behaviour of scan() considerably: > scan(what="

Re: [Rd] GPL and R Community Policies (Rcpp)

2010-12-02 Thread peter dalgaard
es by now have been dug so deeply that any attempt of impartial mediation will be seen by both parties as siding with the other. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email:

Re: [Rd] 'identical' and the warning "ignoring non-pairlist attributes"

2010-12-11 Thread peter dalgaard
so perhaps identical() just shouldn't check. On the other hand, it could also be the sign of a memory overrun in the preceding memory-intensive operation. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email

Re: [Rd] 'identical' and the warning "ignoring non-pairlist attributes"

2010-12-11 Thread peter dalgaard
On Dec 11, 2010, at 11:23 , peter dalgaard wrote: > > On Dec 11, 2010, at 08:23 , Niels Richard Hansen wrote: > >> Dear R developers >> >> Using the 'foreach' package I encounter warnings like >> >> Warning message: >> In identi

Re: [Rd] 'identical' and the warning "ignoring non-pairlist attributes"

2010-12-12 Thread peter dalgaard
es have the same hash index, a final linear search through a chained list of names is necessary.) -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [Rd] Warning message when items of Hmisc are masked by loading a package.

2010-12-21 Thread peter dalgaard
gt; $status >>>> [1] "" >>>> >>>> $major >>>> [1] "2" >>>> >>>> $minor >>>> [1] "12.1" >>>> >>>> $year >>>> [1] "2010" >>>> >>>> $m

Re: [Rd] environment question

2010-12-26 Thread peter dalgaard
Ihaka and Gentleman on lexical scope, 1996 IIRC). However, some care must be taken; in particular, if you don't make sure that the object already exists in the appropriate environment, another object of the same name might get clobbered, e.g. in the global environment. Best, -pd (& th

Re: [Rd] problem building R 2.12.1 64-bit on Windows 7

2010-12-30 Thread peter dalgaard
@ sign from the beginning of that line > in MkRules, and see what it is trying to do just before it dies. > > Duncan Murdoch Off-the-cuff: Is there a virus scanner active on the system? We have had a couple of reports that turned out to be antivirus software swiping files away fo

Re: [Rd] scoping/non-standard evaluation issue

2011-01-04 Thread peter dalgaard
Year > 1.164e+00-1.911e+00 > > - snip --- > > The problem with f1() is that it will clobber a variable named .subs in the > global environment; the problem with f2() is that .subs can be masked by a > variable in the global environment. >

Re: [Rd] scoping/non-standard evaluation issue

2011-01-05 Thread peter dalgaard
6.909e-02-3.971e-03-8.595e-03 >>> Population Year >>> 1.164e+00-1.911e+00 >>> >>> - snip --- >>> >>> The problem with f1() is that it will clobber a variable named .subs in > the >>> global environment; the

Re: [Rd] scoping/non-standard evaluation issue

2011-01-06 Thread peter dalgaard
try eval(bquote(plot(.(rnorm(20) -pd -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing li

Re: [Rd] as.environment.list provides inconsistent results under torture

2011-01-12 Thread peter dalgaard
parser lookahead breaking protection stack discipline, fixed by UNPROTECT_PTR() etc.). I lost track a bit in the frenzy and I never got around to backing out everything. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjer

[Rd] Windows script editor and locale

2011-01-21 Thread peter dalgaard
ss it. Would be nice if there was something like a set-coding-system to call up via a menu item. Any pointers? -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: p

Re: [Rd] "+" operator on characters revisited

2011-01-23 Thread peter dalgaard
rules: Is "x"+1+2 supposed to be equal to "x12" or "x3"? -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [Rd] trojan at current development version?

2011-01-28 Thread peter dalgaard
d > a trojan in open.exe at bin\i386. We have seen false positives before (accidental mismatch between virus signatures and legitimate programs). But presumably, the Windows maintainers will double-check, just in case. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solb

Re: [Rd] Problem with confint function

2011-02-11 Thread peter dalgaard
d approximation implied by +/- 1.96*SE. If you insist on the latter, try confint.default. (This *is* all on the help page for confint()!). > Thanks! > > -- > All the best!, > ~Joaquin A. Aguilar A. - aka Kino > > [[alternative HTML version deleted]] > > ___

Re: [Rd] request for patch in "drop1" (add.R)

2011-02-23 Thread peter dalgaard
pe, e.g. by doing all tests via anova(model1,model2,...). I'm not quite up to figuring out how complicated that would be. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email:

Re: [Rd] broken link on CRAN

2011-02-28 Thread peter dalgaard
__ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gma

Re: [Rd] Create an environment and assign objects to it in one go?

2011-03-09 Thread peter dalgaard
t;- local({ a <- 1; b <- 2; environment()}) env$a -pd > /Henrik > > PS. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg P

Re: [Rd] Standardized Pearson residuals

2011-03-14 Thread peter dalgaard
pe, pearson = infl$pear.res, infl$dev.res) > res <- res/sqrt(1-infl$hat) > res[is.infinite(res)] <- NaN > res > } > > __ > R-devel@r-project.org mailing list > https://stat.ethz

Re: [Rd] Standardized Pearson residuals

2011-03-15 Thread peter dalgaard
anova(glm(births~1,poisson,data=bb), test="Chisq") ... Df Deviance Resid. Df Resid. Dev P(>|Chi|) NULL11 225.98 Notice that the latter version gives me the correct deviance but no p-value. A better support for generic score tests could be desira

Re: [Rd] Standardized Pearson residuals

2011-03-15 Thread peter dalgaard
On Mar 15, 2011, at 13:42 , John Maindonald wrote: >> Peter Dalgaard: It would also be nice for teaching purposes if glm or >> summary.glm had a >> "pearsonchisq" component and a corresponding extractor function, but I >> can imagine that there might be

Re: [Rd] Standardized Pearson residuals

2011-03-15 Thread peter dalgaard
On Mar 15, 2011, at 14:22 , Jari Oksanen wrote: > On 15/03/11 13:17 PM, "peter dalgaard" wrote: > >> >> On Mar 15, 2011, at 04:40 , Brett Presnell wrote: >> >>> >>>>> Background: I'm currently teaching an undergrad/grad-servic

Re: [Rd] Standardized Pearson residuals (and score tests)

2011-03-17 Thread peter dalgaard
Eliza Hall Institute of Medical Research, > 1G Royal Parade, Parkville, Vic 3052, Australia. > sm...@wehi.edu.au > http://www.wehi.edu.au > http://www.statsci.org/smyth > >> Date: Tue, 15 Mar 2011 12:17:46 +0100 >> From: peter dalgaard >> To: Brett Presnell >&

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread peter dalgaard
xamples using rstandard(). I rather strongly suspect that there aren't many user codes using it either. It is quite tempting simply to commit the change (after updating the docs). One thing holding me back though: I don't know what "the literature" refers to. -- Peter Dalg

Re: [Rd] Standardized Pearson residuals

2011-03-17 Thread peter dalgaard
On Mar 17, 2011, at 16:14 , Martin Maechler wrote: >>>>>> peter dalgaard >>>>>>on Thu, 17 Mar 2011 15:45:01 +0100 writes: >> > >> Back to the original question: > >> The current rstandard() code reads > > ## FIXME

Re: [Rd] Standardized Pearson residuals

2011-03-18 Thread peter dalgaard
, I have committed the new rstandard(); to r-devel for now, if nothing falls on its face, we can move it to R 2.13.0 alpha before it goes to beta on March 30. -p -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone:

Re: [Rd] split(factor, shortGroupVector) gives incorrect results in R 2.12.2

2011-03-21 Thread peter dalgaard
should have seq_along(x) , not f. But would that break for other reasons? (It would! Surv() objects to name one case. In general, we seem to be in trouble if "[" and length() methods are not compatible.) -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plad

Re: [Rd] Orthogonal polynomial ANOVA or polynomial regression?

2011-03-24 Thread peter dalgaard
remove terms one at a time. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __ R-devel@r-project.org mailing list https://stat

Re: [Rd] Testing window for R 2.13.0

2011-03-28 Thread peter dalgaard
ii}{logical; should the compiled file be saved with in ascii" > should read "...saved in ascii..."? Fixed (twice, even. Luke got there before me.) -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone:

Re: [Rd] SurviveGotoBLAS2 for Win64 (RC release)

2011-03-31 Thread peter dalgaard
-JI Nakama >> "\u4e2d\u9593\u6804\u6cbb" >> > > -- > EI-JI Nakama > "\u4e2d\u9593\u6804\u6cbb" > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard Cent

Re: [Rd] Adding a "description" meta-tag to the R homepage

2011-04-01 Thread peter dalgaard
-- > Contact me: tal.gal...@gmail.com | 972-52-7275845 > Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | > www.r-statistics.com (English) > ------ > > [[alternative HTML version deleted]] > > _

Re: [Rd] core Matrix package segfaulted on R CMD check --use-gct

2011-04-07 Thread peter dalgaard
(Resending with fewer recipients...) On Apr 8, 2011, at 07:09 , Hin-Tak Leung wrote: > --- On Fri, 8/4/11, peter dalgaard wrote: > >> On Apr 7, 2011, at 23:57 , Hin-Tak Leung wrote: >> >>> >>> Oh, I am tracking both R and Matrix via git-svn and >&g

Re: [Rd] core Matrix package segfaulted on R CMD check --use-gct

2011-04-08 Thread peter dalgaard
erences are so far > mostly documentation-related. I could switch to track R 2.13.x branch if you > insist. > Please do. It's the branch that is supposed to stabilize during prerelease times. Also, please check the prerelease tarballs, errors in "make dist" are not caugh

Re: [Rd] Wish there were a "strict mode" for R interpreter. What about You?

2011-04-10 Thread peter dalgaard
ere are a couple of cases in base R too: * checking R code for possible problems ... NOTE glm.fit: no visible binding for global variable ‘n’ quantile.ecdf: no visible binding for global variable ‘y’ I can't seem to spot the 'n' just now, though... -- Peter Dalgaard Center for Statist

Re: [Rd] Wish there were a "strict mode" for R interpreter. What about You?

2011-04-10 Thread peter dalgaard
It does when run on stats:::quantile.ecdf directly: > >> codetools::checkUsage(stats:::quantile.ecdf) > : no visible binding for global variable ‘nobs’ > : no visible binding for global variable ‘y’ > > Maybe in the context where you saw this nobs is defined in an >

Re: [Rd] open.exe Virus W32.ATRAPS

2011-04-11 Thread peter dalgaard
evel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com __

Re: [Rd] proposal for adapting code of function gl()

2011-04-11 Thread peter dalgaard
cs, biometrics and process control > > tel : +32 9 264 59 87 > joris.m...@ugent.be > --- > Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php > > __ > R-devel@r-project.org mailing list > https:

Re: [Rd] proposal for adapting code of function gl()

2011-04-12 Thread peter dalgaard
Thank you for the example too, I'm learning every day. > I have now committed a version of the below to r-devel. (A couple of demons turned out to be lurking in the details, so not exactly the same code.) -pd > Cheers > Joris > > On Tue, Apr 12, 2011 at 8:51 AM, peter dalgaard

Re: [Rd] parse_Rd raises error when example section contains a quoted percent character

2011-04-12 Thread peter dalgaard
LC_MESSAGES=en_US.UTF-8 > [7] LC_PAPER=en_US.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C > > attached base packages: > [1] tools stats graphics grDevices datasets utils methods > [8] base > > Jeff

Re: [Rd] [R] predict()

2011-04-15 Thread peter dalgaard
ve shown a disadvantage of which I was not >> aware. Using your >> example but replacing coxph() by lm() with otime ~x as the >> model I get a >> similar failure. I'd like to ask a wider audience of >> R-devel since it >> is bigger than coxph. >>

Re: [Rd] help with eval()

2011-04-19 Thread peter dalgaard
", list(dcall, data = BOD, model = FALSE)) + print(model.frame(fit)) + fit} > dfun3(fcall3) demand Time 18.31 2 10.32 3 19.03 4 16.04 5 15.65 6 19.87 Call: lm(formula = demand ~ Time, data = structure(list(Time = c(1, 2, 3, 4, 5, 7), demand = c(8.3,

Re: [Rd] possible minor bug in fisher.test

2011-04-20 Thread peter dalgaard
actor(x[OK]) >y <- factor(y[OK]) > > > with > >x <- as.factor(x[OK]) >y <- as.factor(y[OK]) > > (similar to how it is done in mcnemar.test). > > OK. Of course, the test makes little sense statistically either way if one factor has only one

Re: [Rd] Wish R Core had a standard format (or generic function) for "newdata" objects

2011-04-27 Thread peter dalgaard
subgroup analysis and your "average person" switches from male to female?), so I think it is one of those cases where it is best to provide mechanism, not policy. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)

Re: [Rd] median and data frames

2011-04-27 Thread peter dalgaard
, na.encode = FALSE) : corrupt data frame: columns will be truncated or padded with NAs -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com

Re: [Rd] [R] Sweave stops when opening X11 device fails

2011-05-03 Thread peter dalgaard
> r-h...@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > __

Re: [Rd] Recursive objects

2011-05-04 Thread peter dalgaard
://had.co.nz/ >> >> __ >> R-devel@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > __ > R-devel@r-project.org mailing list > https://stat.ethz.

Re: [Rd] tkrplot not working in R 2.13.0

2011-05-04 Thread peter dalgaard
gt;> [1] TeachingDemos_2.7 tkrplot_0.0-19 >>> >>> loaded via a namespace (and not attached): >>> [1] tools_2.13.0 >>> >>> Thanks, >>> >>> -- >>> Gregory (Greg) L. Snow Ph.D. >>> Statistical Data Center >>

Re: [Rd] anova.lm fails with test="Cp"

2011-05-08 Thread peter dalgaard
cbind(table, Cp = table[, "Resid. Dev"] + 2 * scale * (n - table[, "Resid. Df"])) whereas all the references I can find have Cp=RSS/MS-N+2P, so the above would actually be scale*Cp+N. -- Peter Dalgaard Center for Statistics, Copen

[Rd] New code in R-devel: Rao score test for glm.

2011-05-11 Thread peter dalgaard
(>|Chi|)"[2]. Apologies for the disturbance, but this sort of change just doesn't let itself be implemented with the usual deprecation sequence. The workaround should be straightforward (if you need something that works in multiple versions, then try both and choose the result that

Re: [Rd] New code in R-devel: Rao score test for glm.

2011-05-11 Thread peter dalgaard
tp://www.stat.ufl.edu/~presnell/ > > "We don't think that the popularity of an error makes it the truth." > -- Richard Stallman > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Peter Dalg

Re: [Rd] Possible bug in termplot function (stats package) ?

2011-06-06 Thread peter dalgaard
t University > Faculty of Bioscience Engineering > Department of Applied mathematics, biometrics and process control > > tel : +32 9 264 59 87 > joris.m...@ugent.be > ------- > Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php > > __

Re: [Rd] Possible bug in termplot function (stats package) ?

2011-06-06 Thread peter dalgaard
On Jun 6, 2011, at 20:38 , Joris Meys wrote: > On Mon, Jun 6, 2011 at 6:29 PM, peter dalgaard wrote: >> >> On Jun 6, 2011, at 17:15 , Joris Meys wrote: >> > **snip** >>> If nothing is found, an error is returned. If >>> anything is found, data won

Re: [Rd] Loose code in R package files

2011-06-15 Thread peter dalgaard
d computer. Having results depending on whether or not LazyLoading is being used is probably not a good idea in any case. To have things happen on load, use .onLoad and relatives. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denm

Re: [Rd] X11 device windows are spawned with empty WM_NAME property

2011-06-17 Thread peter dalgaard
ring could contain formatting characters, so possibly, what you really want to do is to default it to "R Graphics: Device %d"). Something of the sort is already happening with the quartz() device. > Thanks, > Drew > > [[alternative HTML version deleted]] > > _

Re: [Rd] X11 device windows are spawned with empty WM_NAME property

2011-06-17 Thread peter dalgaard
11.options(title="R Graphics: Device %d") and the user can do this in his/her startup files. No need to inflict it on every user with any WM. -- Peter Dalgaard Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederik

Re: [Rd] Syntactically valid names

2011-06-30 Thread peter dalgaard
rule, and then there's the stop list of reserved words, which would make your code clumsy whatever you do. How on Earth would you expect anything to be significantly more elegant than your function(x) x == make.names(x) anyway??! (OK, if there was a wrapper for the C level isValidName() f

Re: [Rd] AS Algorithms

2011-07-02 Thread peter dalgaard
f the code, and another on those files. As for AS algorithms actually _in_ R, we have a statement from the RSS to the effect that it is OK to use them in R since R is free software. (I forget the exact wording.) I would expect that to carry over to other GPL software, but it could be prudent t

<    1   2   3   4   5   6   7   8   9   10   >