Re: [R] [FORGED] Dependent Variable in Logistic Regression

2020-08-03 Thread Martin Maechler
> Abby Spurdle > on Sun, 2 Aug 2020 15:13:51 +1200 writes: > That's a bit harsh. Isn't the best advice here, to post a > reproducible example... Which I believe has been > mentioned. > Also, I'd strongly encourage people to use > package+function name, for this

Re: [R] Odd Results when generating predictions with nnet function

2020-09-02 Thread Martin Maechler
lass ~ ...' and then only has classification examples. So, indeed, the ?nnet help page could improved. In his case, y are counts, so John Tukey's good old "first aid transformation" principle would suggest to model sqrt(y) ~ .. in a *regression* model which nnet() can

Re: [R] find number of consecutive days in NC files by R

2020-09-04 Thread Martin Maechler
Indeed. In addition: Do *not* use suppressWarnings( . ) lightly ! Warnings are there for a good reason, and you should think hard and may be ask for help before "blindly" using suppressWarnings(). Whoever told you to do that routinely has not been a good teacher of R .. Best regar

Re: [R] help.start

2013-08-06 Thread Martin Maechler
> Witold E Wolski > on Tue, 6 Aug 2013 16:40:42 +0200 writes: > Does anyone also observes with R 3.1 (on linux) that the help.start there's no R 3.1 . What do you mean really? R 3.0.1 ? or do you mean the current "R under development" which (quite rarely) also shows as 3.1.0 a

Re: [R] algorithm for clustering categorical data

2013-08-06 Thread Martin Maechler
> "DC" == David Carlson > on Tue, 6 Aug 2013 10:26:56 -0500 writes: > What do you mean by representing the categorical fields by 1:k? > a <- c("red", "green", "blue", "orange", "yellow") > becomes > a <- c(1, 2, 3, 4, 5) > That guarantees your results are worthl

Re: [R] optim evils

2013-09-05 Thread Martin Maechler
works much better, i.e., faster than the EM. Then, the code uses optim(), currently always with "BFGS". Martin Maechler, ETH Zurich > I'll try to destill the code so that reproducible failure of L-BFGS-B occurs > and post it here. > Michael Meyer >

Re: [R] permutation of vectors (1 or 0)

2012-12-20 Thread Martin Maechler
> Jeffrey Dick > on Thu, 20 Dec 2012 21:40:15 +0800 writes: > you might also try (names modified a bit since R already has a NULL object) >> Zeros <- rep(0,10) >> Ones <- rep(1,10) >> expand.grid(Map(c, Zeros, Ones)) Wow -- really neat! Thank you, Jeff

Re: [R] Why can't I "unclass" an array?

2012-12-21 Thread Martin Maechler
class is no attribute : > attributes(array(1,1)) $dim [1] 1 > attributes(matrix(1,1)) $dim [1] 1 1 > m <- matrix(1,1); identical(m, unclass(m)) [1] TRUE > a <- array(1,1); identical(a, unclass(a)) [1] TRUE > Martin Maechler, ETH Zurich >> zed <- table(1:

Re: [R] Spammer radhi

2012-12-24 Thread Martin Maechler
etely disallow posting from Nabble. This would be somewhat a problem: I had been told that some people use Nabble in order to be able to reply to messages "in the correct thread" (which is good), which they cannot easily otherwise. At the moment, I tighten the filters but do not yet comple

[R] R's configure on Fedora 17

2013-01-11 Thread Martin Maechler
> Prof Brian Ripley > on Fri, 11 Jan 2013 11:49:26 + writes: > On 11/01/2013 01:50, Rolf Turner wrote: >> >> Some while ago I posted a problem on this list concerning a failure of >> R CMD check on one of my packages that resulted from LaTeX being >> unable to

Re: [R] create block diagonal with each rows

2013-01-17 Thread Martin Maechler
1 5 9 13 17 . . . . . . . . . . . . . . . [2,] . . . . . 2 6 10 14 18 . . . . . . . . . . [3,] . . . . . . . . . . 3 7 11 15 19 . . . . . [4,] . . . . . . . . . . . . . . . 4 8 12 16 20 > and if you don't want a sparse matrix for some reason, (and think twice: it

Re: [R] robustbase adjbox segfault - memory not mapped

2013-03-04 Thread Martin Maechler
f = range, doReflect = doReflect) B> 6: adjbox.default(split(mf[[response]], mf[-response]), ...) B> 7: adjbox(split(mf[[response]], mf[-response]), ...) B> 8: adjbox.formula(x ~ y) B> 9: adjbox(x ~ y) Indeed, I (as maintainer of robustbase) can reproduce the segfault.

Re: [R] robustbase adjbox segfault - memory not mapped

2013-03-06 Thread Martin Maechler
when the sample size was >= 2^16.5. I'm planning to submit robustbase_0.9-7 to CRAN today. Martin B> Regards B> Baan B> On Monday 04 March 2013 10:19 PM, Martin Maechler wrote: >>>>>>> "B" == Baan >>>>>>>

Re: [R] phyper returning zero

2013-03-15 Thread Martin Maechler
> "eh" == elliott harrison > on Fri, 15 Mar 2013 08:52:36 + writes: eh> Hi, eh> I am attempting to use phyper to test the significance eh> of two overlapping lists. I keep getting a zero and eh> wondered if that was determining non-significance of my eh> overla

Re: [R] Copula package - normalCopula() param order

2013-03-19 Thread Martin Maechler
P <- cor(X) it is P[lower.tri(P)] The next version of the copula package will have a utility function, (at least semantically) equivalent to P2p <- function(P) P[lower.tri(P)] for this purpose, and another one, p2P() for the other way around. Best regards, Martin Maechler,

Re: [R] Need help to plot clara results [clustering]

2013-03-25 Thread Martin Maechler
> capricy gao > on Thu, 21 Mar 2013 06:07:12 -0700 writes: > I am going to use clara for� gene expression analysis, > so tried to play around with the examples from R document: > http://127.0.0.1:10699/library/cluster/html/clara.html > Everything looked fine until I

Re: [R] How do I show real values on a log10 histogram

2013-03-27 Thread Martin Maechler
packages("sfsmisc") require("sfsmisc") ## the data: set.seed(1); summary(x <- rlnorm(100, m = 2, sdl = 3)) ## the plot (w/o x-axis) : r <- hist(log10(x), xaxt = "n", xlab = "x [log scale]") ## the nice axis: axt <- axTicks(1)

Re: [R] assigning cluster id in cluster package-reg.

2013-04-23 Thread Martin Maechler
Well, you don't give much of an example I'm replying CC to the R mailing list. Please ask questions there, rather than adressing individuals for basic help. Here is one; does it answer your question ? data(agriculture) ag.ag <- agnes(agriculture) class(ag.ag) pltree(ag.ag) # the dendrogram

Re: [R] measuring distances between colours?

2013-05-30 Thread Martin Maechler
Dear John, > John Fox > on Thu, 30 May 2013 08:13:19 -0400 writes: > Dear r-helpers, > I'm interested in locating the named colour that's "closest" to an arbitrary RGB colour. Hmm, maybe I was not really marketing well enough what I had added for R 3.0.0 : ---

Re: [R] measuring distances between colours?

2013-05-30 Thread Martin Maechler
> John Fox > on Thu, 30 May 2013 08:51:10 -0400 writes: > Dear Ken, > Yes, that's the paper I was trying to remember, along with the associated spaces. I'll probably get a better solution using the colorspace package. I'm not sure. Some of the colorspace package features

Re: [R] measuring distances between colours?

2013-05-31 Thread Martin Maechler
>>>>> John Fox >>>>> on Thu, 30 May 2013 09:58:18 -0400 writes: > Dear Martin, >> -Original Message- From: Martin Maechler >> [mailto:maech...@stat.math.ethz.ch] Sent: Thursday, May >> 30, 2013 9:18 AM To: John

Re: [R] measuring distances between colours?

2013-05-31 Thread Martin Maechler
> John Fox > on Thu, 30 May 2013 17:14:06 -0400 writes: > Dear all, > My thanks to everyone who addressed my question. I've > incorporated Eik Vettorazzi's suggestion for improved > conversion of hexadecimal RGB colours to decimal numbers, > and Martin Maechler's

Re: [R] agnes() in package cluster on R 2.14.1 and R 3.0.1

2013-06-10 Thread Martin Maechler
e [for dput() ], please send me the *.rda file produced from save(, file=) *and* a the exact call to agnes() for your data. Thank you in advance! Martin Maechler, the one you could have e-mailed directly to using maintainer("cluster") ... > Best regards

Re: [R] agnes() in package cluster on R 2.14.1 and R 3.0.1

2013-06-12 Thread Martin Maechler
u got the the dist.binary() function from. It is not part of standard R nor of the cluster package. Regards, Martin > Regards, > Hugo > Le lundi 10 juin 2013, Martin Maechler a > écrit : >>>>>>> Hugo Varet >>>>>>> on

Re: [R] R equivalent of python module structure and functionality?

2012-09-14 Thread Martin Maechler
> Jeff Newmiller > on Wed, 12 Sep 2012 14:57:38 -0700 writes: > It is my normal practice to install R libraries without > root. Just use your own library directory instead of the > system library. > -

Re: [R] Memory usage in R grows considerably while calculating word frequencies

2012-09-25 Thread Martin Maechler
elapsed >  # 0.036   0.008   0.043 > A.K. Well, dear A.K., your definition of "word" is really different, and in my view clearly much too simplistic, compared to what the OP (= original-poster) asked from. E.g., from the above paragraph, your method will get words such as &qu

Re: [R] help stored permanently

2012-10-22 Thread Martin Maechler
hz.ch/R-manual/R-patched/doc/html would no longer be possible. However to make it possible, you must install R from the sources, and configure it using --enable-prebuilt-html > Are the various places that the help system is served > online sufficient for your purpo

Re: [R] Derivative of expm function

2014-04-24 Thread Martin Maechler
e reliable algorithms for the matrix exponential. It also contains an expmFrechet() function which computes the Frechet derivative of the matrix exponential. I'm pretty confident -- but did not start thinking more deeply -- that this should provide the necessary parts to get partial derivative

Re: [R] INET_NTOA equivalent?

2014-04-24 Thread Martin Maechler
> ip.ntoa(10+ (0:10)) [1] "59.154.202.0" "59.154.202.1" "59.154.202.2" "59.154.202.3" "59.154.202.4" [6] "59.154.202.5" "59.154.202.6" "59.154.202.7" "59.154.202.8" "59.154.202.9"

Re: [R] Fast way to populate a sparse matrix

2014-04-25 Thread Martin Maechler
atrix() in typical examples rather than the current often use of Matrix() or as(, "sparseMatrix") both of which are perfect for the small examples that are typical for help files. Martin Maechler, ETH Zurich __ R-help@r-project.org ma

Re: [R] Problem with new(er) R version's matrix package

2014-04-26 Thread Martin Maechler
. As maintainer of the Matrix package, I'm willing to look into the situation of course. As was mentioned, many things have changed in 4 years. The error message above looks like you'd want to invert a (very close to) singular matrix, and there could be quite few reasons why parts of

Re: [R] Problem with new(er) R version's matrix package

2014-04-28 Thread Martin Maechler
ing to be able to decide whether the previous results were wrong or this newly occurring error is wrong. Indeed, the above is the real question you should address and you have to do yourself alone. > Many thanks, > Werner > Martin Maechler schrieb am 22:00 Samstag, 26.April 2014:

Re: [R] Question on Cluster Package, agnes() function

2014-05-03 Thread Martin Maechler
that others can chime in and all will be searchable for people with a similar question. MM ] Best regards, Martin Maechler __ R-help@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: [R] Problem with products in R ?

2014-05-06 Thread Martin Maechler
[.] Sorry to prolong this thread, but I'm a bit astonished. 'bc' has been a really great tool when it was created (1975, at Bell labs, according to Wikipedia) and made available, open source, eventually, and I have been fond of it at the time. On the other hand, we have had

Re: [R] Freeing up memory in R

2014-05-13 Thread Martin Maechler
> Zilefac Elvis > on Mon, 12 May 2014 15:01:49 -0700 writes: > Hi, > I will like to free up memory in R and make my program execute faster. At the moment, MY PROGRAM IS VERY SLOW probably due to memory issues. Here is sample data (Rcode is found at the end) from one simulati

Re: [R] S3 - how to implement "colnames<-"

2014-05-14 Thread Martin Maechler
DO *NOT* post to both R-help and R-devel !! That is considered *very* impolite. As this is a question for R-help only, i.e., not fit for R-devel anyway : > Witold E Wolski > on Wed, 14 May 2014 10:57:09 +0200 writes: > Have a class for which I would like to provide a "colnames

Re: [R] S3 - how to implement "colnames<-"

2014-05-14 Thread Martin Maechler
Please do *NOT* crosspost to R-devel@ ... Be careful to remove it from CC when you "reply to all" R-help is way enough! Martin Maechler, (in the function R-* mailing list manager) __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] How can I avoid the for and If loops in my function?

2014-06-19 Thread Martin Maechler
e let us know if this helps [and maybe fix your example to become reproducible: do rm(list=ls(all=TRUE)) before source(...) ing the reproducible example script... ] Martin Maechler, ETH Zurich > Thanks. > Laz > Sent from my LG Optimus G™, an AT&T 4G LTE smartph

Re: [R] matrix.csr %*% matrix --> matrix

2012-11-07 Thread Martin Maechler
asses from the Matrix package .. which is part of every R distribution ? "SparseM" has been written as very first package to support sparse matrices, and is to be applauded for that, but it does lack many features nowadays (and also uses less modern algor

Re: [R] cubic spline

2012-12-01 Thread Martin Maechler
., before R had a version number or *any* packages ... and yes, the README then started with the two lines | R Source Code (Tue Jun 20 14:33:47 NZST 1995) | Copyright 1993, 1994, 1995 by Robert Gentleman and Ross Ihaka and it would be *really* *really* great if people did not add stuff to their packa

[R] Spammer? [wa Re: Fitting binomial lmer-model, high deviance and low logLik]

2012-12-03 Thread Martin Maechler
the weekend, and so we, the list moderators, were slightly less alert than usual. It's very unfortunate though. Please R-help readers do apologize. Martin Maechler, ETH Zurich __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] cubic spline

2012-12-03 Thread Martin Maechler
>>>>> Ben Bolker >>>>> on Sat, 1 Dec 2012 21:49:47 + writes: > Martin Maechler stat.math.ethz.ch> writes: > [snip] >> but definitely *no* need to use a function from an extra >> CRAN package .. as someone else ``erro

[R] Increased Spamming via Nabble

2012-12-06 Thread Martin Maechler
option to receive no e-mails from the list. This way the user can send e-mails to the list using that e-mail address directly, but will not receive e-mail directly from the list and can continue to read R-help via the Nabble interface. Martin Maechler, in the name of the volunteer R Help moderators

Re: [R] Matrix package will not loead

2012-12-06 Thread Martin Maechler
> Uzuner, Tolga > on Thu, 6 Dec 2012 16:42:37 + writes: > Thank you for all this, but it appears to be the case that while the packages have been compiled for 2-15.2, the version of R available for download at CRAN is 2-15.1 . I have submitted another email into the list ask

Re: [R] Removing named objects using rm(..)

2012-12-11 Thread Martin Maechler
> "WR" == Worik R > on Tue, 11 Dec 2012 19:59:58 +1300 writes: WR> On Tue, Dec 11, 2012 at 7:49 PM, Jeff Newmiller wrote: >> What about putting your objects in a list, which does not have the search >> through parents semantics? >> ---

Re: [R] stats::runmed - crashes R - session

2014-02-03 Thread Martin Maechler
look into it? I can provide the dataset. Yes, please. I had added the original runmed() interface to R, so even may be the scape goat.. Martin Maechler, ETH Zurich > regards > -- > Witold Eryk Wolski __ R-help@r-project.org mailing

Re: [R] NOTE when checking CRAN income feasibility

2014-02-27 Thread Martin Maechler
> Gunther Schauberger > on Thu, 27 Feb 2014 16:20:36 +0100 writes: > Hello, > recently I submitted a new version of my package EffectStars to CRAN, > but I was told that the following note arises: > * checking CRAN incoming feasibility ... NOTE > Maintainer: ‘Gun

Re: [R] Fast linear convolution with R

2014-02-27 Thread Martin Maechler
> "MM" == Mitchell Maltenfort > on Thu, 27 Feb 2014 10:34:00 -0500 writes: MM> "Convolve" uses the FFT so probably expects powers of 2. Not quite (but in the correct direction): ?fft contains The FFT is fastest when the length of the series being transformed is highl

Re: [R] R mail list archive Google search function not work

2014-03-27 Thread Martin Maechler
> Marc Schwartz > on Wed, 26 Mar 2014 16:25:08 -0500 writes: > On Mar 26, 2014, at 4:14 PM, David Winsemius wrote: >> >> On Mar 25, 2014, at 5:31 PM, Rolf Turner wrote: >> >>> On 26/03/14 12:51, David Winsemius wrote: On Mar 25, 2014, at 9:5

Re: [R] Rmpfr question

2013-09-24 Thread Martin Maechler
rrently working at an LU decomposition). > scale(M1,TRUE,FALSE) not directly, in the current version of Rmpfr. But you can use the following trick: scale.mpfrMatrix <- scale.default environment(scale.mpfrMatrix) <- asNamespace("Rmpfr") and then it will work. > Sorry bu

Re: [R] Rmpfr question

2013-09-25 Thread Martin Maechler
> Michel > on Tue, 24 Sep 2013 12:22:10 +0200 writes: > Hello, Thanks for your answer The file does not contains > numbers in high precision but all the calculation applied > to these data will be > In attachment a text file containing some lines And her > few va

Re: [R] Rmpfr question

2013-09-25 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Wed, 25 Sep 2013 11:08:07 +0200 writes: >>>>> Michel >>>>> on Tue, 24 Sep 2013 12:22:10 +0200 writes: >> Hello, Thanks for your answer The file does not contains >> number

Re: [R] Why does sin(pi) not return 0?

2013-09-26 Thread Martin Maechler
[1] -8.9200160854418520294613808989866371392121893805952954481681649396960358864e-73 > asNumeric(sin(pii)) [1] -8.920016e-73 > So you see, the more accurate the approximation pii for the true \pi, the more accurate is the result of sin(pii) Martin Maechler, ETH Zurich (and author of R

Re: [R] cor matrix in multivariate regression

2013-10-22 Thread Martin Maechler
. . 0.8 1.0 0.8 . . . . . [7,] . . . . . 0.8 1.0 0.8 . . . . [8,] . . . . . . 0.8 1.0 0.8 . . . [9,] . . . . . . . 0.8 1.0 0.8 . . [10,] . . . . . . . . 0.8 1.0 0.8 . [11,] . . . . . . . . . 0.8 1.0 0.8 [

Re: [R] bug in dummy.coef?

2013-10-28 Thread Martin Maechler
y of the method. options(contrasts=old) where interestingly, there is no warning anymore, even though the comment says there would be one, and I think I see the warning in dummy.coef.lm's code ... which would been triggered somewhere in the past ... Many years ago, partly in S / S+ times,

Re: [R] MM estimator

2013-11-14 Thread Martin Maechler
t 'method' and so eventually nlrob.MM(, method="MM") will correspond to current to the R-forge version robustbase:::nlrob.MM() --- Please for all more, use the dedicated mailing list R-SIG-robust only (i.e. do *not* just reply-all to this e-mail!). Marti

Re: [R] cbind2() in Matrix

2013-11-15 Thread Martin Maechler
rogramming {not available at the time cBind / rBind were created}, actually the whole idea was that you would simply use cBind(mat1, mat2, mat3) Maybe we have to review this matter, or at least add something to the help pages. Martin Maechler, ETH Zurich RB> Em 12-11-2013 17:20,

Re: [R] Why daisy() in cluster library failed to exclude NA when computing dissimilarity

2013-12-09 Thread Martin Maechler
want to have to WTFM again on the mailing list. RTFM. -- Barry Rowlingson R-help (October 2003) ... which I now did in spite of Barry's excellent point ... let's say it's because of approaching Christmas ! Martin Maechler, ETH Zurich _

Re: [R] Lattice: How to color the data points in splom() according to the panel they are plotted?

2010-06-14 Thread Martin Maechler
(!("..." %in% names(formals(panel pargs <- pargs[intersect(names(pargs), names(formals(panel)))] With the above change, a user could use a panel function with (i,j) arguments, and e.g. say Cmat <- outer(1:6,1:6, function(i,j) rainbow(

Re: [R] R and LINGO?

2010-06-17 Thread Martin Maechler
e. (It has one short section on interfaces to commercial software, "CPLEX", mentioned to also solve mixed integer problems) b> Any help or suggestions would be appreciated. You are welcome! Martin Maechler, ETH Zurich b> Brwin338 b> [[alternative HTML version

Re: [R] vlmc - "In vlmc(traffic.clusters.stationary, cutoff = i) : alphabet with >1-letter strings; trying to abbreviate"

2010-06-30 Thread Martin Maechler
vc <- vlmc(a, cutoff=5, quiet = TRUE) or vc <- vlmc(a, cutoff=5, code1char = FALSE) > I have looked at the documentation plus > Mchler M. and Bhlmann P. (2004) Variable Length Markov Chains: > Methodology, Computing, and Software. _J. Computational and > Graph

Re: [R] S4 classes and debugging - Is there a summary?

2010-07-02 Thread Martin Maechler
patialPoints" >> object="Raster", xy="vector" >> object="RasterLayer", xy="matrix" >> object="RasterStackBrick", xy="matrix" >> >> And now...? > selectMethod(xyValues,

Re: [R] question concerning VGAM

2010-07-05 Thread Martin Maechler
tat.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. Hmm, and which part of the two lines above did you not understand? example(vglm) already contains u

Re: [R] Fast String operations in R ? Cost of String operations

2010-07-06 Thread Martin Maechler
re not fast enough for your task at hand? Please read and adhere to the posting guide, see the footer of *every* R-help message, cited below... ((and then work, and may be then ask a more specific question)) Martin Maechler, ETH Zurich __ R-help@r-project

Re: [R] Matrix Column Names

2010-07-13 Thread Martin Maechler
abbreviate(vnames, 8) or variations of that such as vnames <- abbreviate(vnames, 8, method="both.sides") or also vnames <- abbreviate(vnames, 8, strict=FALSE) DN> Many thanks! you're welcome! Martin Maechler, ETH Zurich _

Re: [R] [R-pkgs] New package "list" for analyzing list surveyexperiments

2010-07-14 Thread Martin Maechler
_" is currently used as separator between package name and package version in some contexts, and allowing "_" be part of the package name itself may need more changes in the R project infrastructure (including package repositories and their tools !!) than we (R Core) would want to unde

Re: [R] A problem about the package "lme4" in R-2.11.1

2010-07-14 Thread Martin Maechler
ommands you then enter? Please provide the result of sessionInfo(), as well. I'm pretty sure you have some version mismatch (versions of R, and lme4 and the Matrix package, probably). Martin Maechler, ETH Zurich NC> Sincerely, NC> Joe __

Re: [R] approxfun-problems (yleft and yright ignored)

2010-09-11 Thread Martin Maechler
ou've submitted (https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14377) and which does *not* show any bug: > range(y.out) [1] 0.000 0.9816907 Of course, I do believe that you've seen the above problems, -- on 64-bit Mac ? as you report in sessionInfo() ? -- but I cannot rep

Re: [R] approxfun-problems (yleft and yright ignored)

2010-09-11 Thread Martin Maechler
>>>>> "MM" == Martin Maechler >>>>> on Sat, 11 Sep 2010 16:04:37 +0200 writes: >>>>> "SW" == Samuel Wuest >>>>> on Thu, 26 Aug 2010 14:34:26 +0100 writes: SW> Hi Greg, SW> thanks for the sug

Re: [R] approxfun-problems (yleft and yright ignored)

2010-09-11 Thread Martin Maechler
>>>>> Duncan Murdoch >>>>> on Sat, 11 Sep 2010 10:32:38 -0400 writes: > On 11/09/2010 10:04 AM, Martin Maechler wrote: >>>>>>> "SW" == Samuel Wuest >>>>>>> on Thu, 26 Aug 2010 14:34:26 +0100

Re: [R] approxfun-problems (yleft and yright ignored)

2010-09-11 Thread Martin Maechler
>>>>> Duncan Murdoch >>>>> on Sat, 11 Sep 2010 11:23:02 -0400 writes: > On 11/09/2010 11:13 AM, Martin Maechler wrote: >>>>>>> Duncan Murdoch >>>>>>> on Sat, 11 Sep 2010 10:32:38 -0400 writes: >

Re: [R] Problem with cat() == A related question

2010-09-15 Thread Martin Maechler
> 3 8 13 18 23 > 4 9 14 19 24 > 5 10 15 20 25 Yes. A (slightly more general and efficient) version is > sfsmisc::empty.dimnames( matrix(1:40, 5,8) ) 1 6 11 16 21 26 31 36 2 7 12 17 22 27 32 37 3 8 13 18 23 28 33 38 4 9 14 19 24 29 34 39 5 10 15 20 25 30

Re: [R] name ONLY one column // empty.dimnames() in 'sfsmisc'

2010-09-29 Thread Martin Maechler
ollection). Excerpt from its help page: > empty.dimnames package:sfsmisc R Documentation > Empty Dimnames of an Array. > Description: > `Remove' all dimension names from an array for compact printing. > Usage: > empty.dimnames(a) > Ar

Re: [R] Rmpfr question

2010-10-16 Thread Martin Maechler
ope I'm not doing your home work here. The correct solution of course is > a <- sin(mpfr(10, 230)^22) > b <- log(mpfr(171, 230)/10) > c <- exp(mpfr(42, 230)/100) > (d <- 173746*a + 94228*b - 78487*c) 1 'mpfr' number of precision 230 bits [1] -1.3418189578296

Re: [R] An empty grey diagram

2010-11-22 Thread Martin Maechler
plot (len ~ dose, data=ToothGrowth) abline(lm(len ~ dose, data=ToothGrowth)) and you can see {if you use a fixed-width font in your e-mail, it "springs into your eyes"} how nicely the formula notation of graphics alings with the same in models. If the abov

Re: [R] Troubles using postscript(family = "ComputerModern")

2010-12-01 Thread Martin Maechler
> David Winsemius > on Mon, 29 Nov 2010 09:46:08 -0500 writes: > On Nov 29, 2010, at 9:00 AM, pilchat wrote: >> Hi guys, >> >> to make it easier, here is a simple case with the same issues. I use >> the short function below to make the attached PS file. >>

Re: [R] robustbase problem [bug?] in adjbox function.

2010-12-08 Thread Martin Maechler
s problem corrected, and actually we'd be very happy if you could stress test this version. A release is planned soon, and actually only delayed by a careful modification of the Qn() finite sample correction ... as the new version corrects a long-standing typo in the decimal digits of the consistenc

Re: [R] How to catch both warnings and errors?

2010-12-09 Thread Martin Maechler
d result. ##' ##' @title tryCatch both warnings and errors ##' @param expr ##' @return a list with 'value' and 'warning', where ##' 'value' may be an error caught. ##' @author Martin Maechler tryCatch.W.E <- function(expr) { W <

Re: [R] Perl "cut" equivalent in R

2010-12-10 Thread Martin Maechler
> "SL" == Steve Lianoglou > on Mon, 6 Dec 2010 14:21:59 -0500 writes: >>> if(FALSE) { stuff your don't want executed          } >>> >> > Switching a block of code off/on with editing a single >> character may be done using 0/1 instead of FALSE/TRUE. SL> Or even

Re: [R] Numbers in a string

2010-12-17 Thread Martin Maechler
> Petr Savicky > on Wed, 15 Dec 2010 14:21:37 +0100 writes: > On Wed, Dec 15, 2010 at 11:08:06AM -0200, Henrique > Dallazuanna wrote: >> Try this: >> >> gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65") > Consider also > strsplit("AB15E9SDF654VKBN?dvb.65",

Re: [R] package survey

2010-12-20 Thread Martin Maechler
top of your JS> head) is there some way of sending the code for all JS> functions in particular package to a ".r" file from the JS> command line with one or two lines of code? Note that only the source package contains the real source code. What you g

Re: [R] sum with times

2010-12-20 Thread Martin Maechler
> "RRJ" == Ronaldo Reis Junior > on Sun, 19 Dec 2010 12:10:54 -0200 writes: RRJ> Hi, Forget, the chron package work with this No, don't forget, rather solve the problem: Date / dateTime classes are "native R entities"; extension package 'chron' objects are not. ___

Re: [R] Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)

2010-12-29 Thread Martin Maechler
am, but that doesn't TG> enable me to turn it back into an hclust object. Why should you "turn it back" ? What do you want to use them for The intent of the "dendrogram" has been that it is more flexible (and more general) than "hclust" and can be printed, pl

Re: [R] R-code to generate random rotation matrix for rotation testing

2010-12-29 Thread Martin Maechler
ro vector. Consequently: Your procedure must rather be 1) Y0 <- Y - mY 2) Z0 <- Q' %*% Y0 3) Z <- Z0 + mY and to make this work with data matrices Y, Z, the mean vector mY must either be a matrix with constant columns or the result of as.vector()ing such a matrix. Reg

Re: [R] Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)

2010-12-29 Thread Martin Maechler
> Tal Galili > on Wed, 29 Dec 2010 13:32:26 +0200 writes: > Hello Martin, > Thank you for replying. > I have two needs: > 1) To merge two dendrograms into one. > 2) To then run cutree on it (which works on hclust, but >not on dendrogram). Well, but cut(

Re: [R] Any functions to manipulate (merge, cut, remove) hclust objects? (maybe through phylo?)

2010-12-29 Thread Martin Maechler
r-project :) Cool. Actually, now I think the merge() is the much easier part than the cutree() / as.hclust.dendrogram() one. But also that should not be very hard. As I'm officially in vacation at the moment, I may have some fun helping with these... Martin > On Wed, Dec 29, 2010 at 1:4

Re: [R] Removing rows with earlier dates

2010-12-29 Thread Martin Maechler
th Day > 31 37 279 7.4 76 5 31 > 61 NA 138 8.0 83 6 30 > 92 59 254 9.2 81 7 31 > 12385 188 6.3 94 8 31 > 15320 223 11.5 68 9 30 Hmm, yes, but " FUN = function(x) { max(x) } "

Re: [R] defining a formula method for a weighted lm()

2011-01-06 Thread Martin Maechler
40 45 50 55 60 > sapply(lapply(strsplit(Astr, "-"), as.numeric), `[[`, 2) [1] 29 34 39 44 49 54 59 64 > sapply(lapply(strsplit(Astr, "-"), as.numeric), mean) [1] 27 32 37 42 47 52 57 62 Or use the 2-row matrix and apply(*, 1) to that : > sapply(strsplit(Astr, "-

Re: [R] Problem with timeSequence {timeDate} - wrong end date

2011-01-07 Thread Martin Maechler
t(r1) > } > and "res" is the object returned in both cases (I believe). Thank you, Joshua. Note that "R 2.12.1 patched" and "R 2.13.0 unstable" have this fixed (since yesterday) and hence will no longer "overshoot". Also, the next rele

Re: [R] "cannot allocate vector of size ..." in RHLE5 PAE kernel

2011-01-17 Thread Martin Maechler
> "MZ" == Mauricio Zambrano > on Mon, 17 Jan 2011 11:46:44 +0100 writes: MZ> Dear R community, MZ> I'm running R 32 bits in a 64-bits machine (with 16Gb of Ram) using a MZ> PAE kernel, as you can see here: MZ> $ uname -a MZ> Linux mymachine 2.6.18-238.el5PAE #1 SM

Re: [R] Installing the Zoo *package*

2010-07-28 Thread Martin Maechler
rtran, C++, etc functions (sometimes called a "DLL", notably in Windows) which in R is loaded by dyn.load() or library.dynam() -- typically implicitly when a package is loaded containing compiled code. As you declare yourself an "R newbie", one of the early steps will be to use p

Re: [R] easy debugging

2010-07-28 Thread Martin Maechler
gt; equated >> [1] 111.00 112.06 112.90 113.80 115.00 116.20 117.00 118.00 120.00 >> 120.00 120.00 >> > Note that for the particular question, pmin(120, equated) is more efficient than any of the other versions you've mentioned. Martin Maechler, ETH Zurich

Re: [R] Documenting different OO-aproaches in R as a package?

2010-07-28 Thread Martin Maechler
t;legacy" applications) and S4, and concentrate on these rather than fostering even more alternatives. Everything else has been by contributed by R users who were not happy with S4 ... at the time at least ... Note that in the last several R releases, S3 <-> S4 "interoparability&q

Re: [R] Confidence Intervals for logistic regression

2010-08-07 Thread Martin Maechler
S (the book!), I think even in its first edition. Even more reliable (probably) would be to use the (recommended) 'boot' package and use bootstrap confidence intervals, i.e., boot.ci() there. Martin Maechler, ETH Zurich __ R-help@r-project.org ma

Re: [R] Function to Define a Function

2010-08-10 Thread Martin Maechler
00,0.2,1000) >> res2 >> > Try this: > mdlChooser <- function(type = c("one", "two")) { > one <- function(x,N0,r) N0*exp(x*r) > two <- function(x,N0,r,K) (N0*K)/(N0+(K-N0)*exp(-x*r)) > type <- match.arg(type)

Re: [R] Learning ANOVA

2010-08-16 Thread Martin Maechler
> Liaw, Andy > on Mon, 16 Aug 2010 08:22:33 -0400 writes: > From: Stephen Liu >> >> Hi JesperHybel, >> >> Thanks for your advice. >> >> >If you're trying to follow the youtube video you have a >> typing mistake here: >> >> >InsectSprays.aov

Re: [R] How to make 'step' faster?

2010-08-20 Thread Martin Maechler
>> Also, the datasets I am working with contain very few non-zero >> entries. Can a sparse function specification be used on step? GS> I don't think this is possible at the moment in R, but several people, GS> including Doug Bates and Martin Maechler, are working on

Re: [R] Documenting S4 Methods

2010-08-25 Thread Martin Maechler
> Dario Strbenac > on Wed, 25 Aug 2010 13:00:03 +1000 (EST) writes: > I'm in the process of converting some S3 methods to S4 methods. > I have this function : > setGeneric("enrichmentCalc", function(rs, organism, seqLen, ...){standardGeneric("enrichmentCalc")}) > se

Re: [R] Why is vector assignment in R recreates the entire vector ?

2010-09-03 Thread Martin Maechler
performed. NM> ... NM> I brought this up in r-devel a few months ago. yes, thank you Norm, for the pointer. Indeed this whole topic really belongs to R-devel not R-help. Martin Maechler NM> You can read my posting, NM> and the various replies, at NM> http://

Re: [R] Using library and lib.loc

2010-09-03 Thread Martin Maechler
) in your Rprofile or you can set R_LIBS in yourRenviron and there are variations and combinations of the above. See ?Startup to learn about Rprofile and Renviron settings. Martin Maechler, ETH Zurich o> Thanks, o> Olivier __

<    1   2   3   4   5   6   7   8   9   >