Re: [R] the less-than-minus gotcha

2015-02-03 Thread Martin Maechler
half <- (n + 1)/2 if(n %% 2 == 1) { sort(x, partial = half)[half] } else { sum(sort(x, partial = c(half, half + 1))[c(half, half + 1)])/2 } } ----- so yes,

Re: [R] FFT Normalization Documentation

2015-02-05 Thread Martin Maechler
e. You may also chose to discuss an "optimal example" by e-mail between you, as you've already started to do so, implicitly. Martin Maechler, ETH Zurich >>>>> Jeff Newmiller >>>>> on Tue, 3 Feb 2015 19:43:25 -0800 writes: > I see now the

Re: [R] FFT Normalization Documentation

2015-02-05 Thread Martin Maechler
>>>>> Hiroyuki Kawakatsu >>>>> on Thu, 5 Feb 2015 12:40:28 + writes: > On 2015-02-05 Martin Maechler wrote: > [...] >> Both a definition of the DFT (in LaTeX or directly as \deqn{}{}) which >> matches *our* fft()

Re: [R] Not finding superclass in library

2015-02-24 Thread Martin Maechler
> Rolf Turner > on Tue, 24 Feb 2015 09:41:42 +1300 writes: > On 24/02/15 09:35, Ramiro Barrantes wrote: >> Hello, >> >> I have a library that I created . > > No you ***DO NOT***. You have a ***PACKAGE***. If you > cannot even get your terminology

Re: [R] Not finding superclass in library

2015-02-24 Thread Martin Maechler
??? Please do for(i in 1:20) cat("It's a package!\n") -- Martin Maechler (after a newly released *package* has been called *library* three times in its announcement on R-packages) R-help (March 2006) > === :-) === Martin __

[R] format( "www.R-project.org" , year = 2015)

2015-03-04 Thread Martin Maechler
is auto produced using pandoc (and IT infrastructure in Vienna and Zurich). Martin Maechler, as secretary of the R Foundation ___ r-annou...@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-announce

Re: [R] Course and book announcements on r-help

2015-03-14 Thread Martin Maechler
(inspired by Haim Harari's thoughts in http://edge.org/response-detail/26056) Best regards, Martin Maechler, ETH Zurich and R Core >> -Original Message- From: >> wolfgang.viechtba...@maastrichtuniversity.nl Sent: Fri, >> 13 Mar 2015 10:2

Re: [R] Course and book announcements on r-help

2015-03-16 Thread Martin Maechler
Definitely, Spencer. I was talking about explicit announcements. Martin > On 3/14/2015 9:53 AM, Martin Maechler wrote: >>>>>>> John Kane on Fri, 13 Mar 2015 >>>>>>> 06:16:19 -0800 writes: >> > I have the feeling that this wa

Re: [R] Convert color hex code to color names

2015-04-13 Thread Martin Maechler
different color spaces and a default set of cutoffs, for defining what "near" means. I had thought at the time to make a regular function out of it, but then did not follow up on myself :-) Martin Maechler, ETH Zurich and R core team > On Apr 13, 2015, at 11:45 AM, Thierry Onkelinx

Re: [R] loop over matrix: subscript out of bounds

2018-08-07 Thread Martin Maechler
> Thanks for help! > However, changing the index from i to j for the column vector changes the > output. I would like the matrix to be the following: > -1 1 0 0 0 0 0 > 0 -1 1 0 0 0 0 > 0 0 -1 1 0 0 0 > . > etc. > How to code it? as Enrico Schumann showed you: Without any loop, a very nic

Re: [R] loop over matrix: subscript out of bounds

2018-08-08 Thread Martin Maechler
> Eric Bergeron Wed, 8 Aug 2018 12:53:32 +0300 writes: > You only need one "for loop" > for(i in 2:nrow(myMatrix)) { >myMatrix[i-1,i-1] = -1 >myMatrix[i-1,i] = 1 > } > > HTH, > Eric and why are you not using Enrico Schumann's even nicer solution (from August 6) that I had mention

Re: [R] Fwd: Help with finalfit and knitr

2018-08-08 Thread Martin Maechler
> Bert Gunter > on Wed, 8 Aug 2018 08:21:05 -0700 writes: > (From Jeff Newmiller) "My advice is to enter one line of > each example at a time and study what it does before > proceeding to the next line. Copying whole swathes of code > and marveling at the result is exh

Re: [R] Prevent Printing Function's Environment

2018-08-14 Thread Martin Maechler
> Abs Spurdle > on Tue, 14 Aug 2018 15:16:08 +1200 writes: > Hi All > When you print a function constructed within a function, R > prints it's environment. For example: > > myfunction = function () > + { f = function () NULL > + attributes (f) = lis

Re: [R] Account for a factor variability in a logistic GLMM in lme4

2018-09-04 Thread Martin Maechler
used by that mistake: Only considering the '1's and not considering the '0's in the data (visualised and shown to the decision making experts). See, e.g., https://priceonomics.com/the-space-shuttle-challenger-explosion-and-the-o/ (couldn't easily find a more academic

Re: [R] Smallest Space Analysis (SSA) in R

2018-09-20 Thread Martin Maechler
> Eric Berger > on Thu, 20 Sep 2018 23:28:27 +0300 writes: > Hi Andrew, > I don't have any experience in this area but I was intrigued by your > question. Here is what I learned. > 1, A bit of poking around turned up a thread on stats.stackexchange that > mentions

Re: [R] Link from vignette to package documentation

2018-09-22 Thread Martin Maechler
package (*.Rmd or *.Rnw) vignettes to help pages of the same package is also not easily and portably possible AFAICS. Both would be desirable quite desirable for improved R documentation and ideally so in a way that could also work with an internet connection. [and if we continue this,

Re: [R] For Loop

2018-09-25 Thread Martin Maechler
> Wensui Liu > on Sun, 23 Sep 2018 13:26:32 -0500 writes: > what you measures is the "elapsed" time in the default > setting. you might need to take a closer look at the > beautiful benchmark() function and see what time I am > talking about. > I just provided ten

Re: [R] Project in emacs + ess

2018-10-18 Thread Martin Maechler
ow, and issues are tracked here: https://github.com/emacs-ess/ESS/issues/ Last but not least : Welcome to the world of Emacs and ESS ! -- Martin Maechler ETH Zurich (and ESS core team) > Cheers, Bert > Bert Gunter > "The trouble with having an open mind is that

Re: [R] OT: R version 1.0.1 is still a success.

2018-11-01 Thread Martin Maechler
> Rui Barradas > on Thu, 1 Nov 2018 07:05:54 + writes: > Hello, This has nothing to do with R-help and I apologize > in advance but this is really, really strange. > A SO user is still using R 1.0.1: > https://stackoverflow.com/questions/53096176/how-do-i-change

Re: [R] R command prompt newline treatment

2018-11-06 Thread Martin Maechler
> Jeff Newmiller > on Mon, 5 Nov 2018 18:47:00 -0800 writes: > Well, you may or may not have ruled out the Putty settings > (your hand waving is a bit hard for me to interpret), and > there may still be host side terminal settings involved, > or if you compiled R yours

Re: [R] saveRDS() and readRDS() Why? [solved, kind of]

2018-11-08 Thread Martin Maechler
> Patrick Connolly > on Thu, 8 Nov 2018 20:27:24 +1300 writes: > Many thanks to Berwin, Eric, Robert, and Jan for their input. > > I had hoped it was as simple as because I typed > > saveRDS("rawData", file = "rawData.rds") on the Windows side. > but that wasn't the case. > > Rob

Re: [R] which element is duplicated?

2018-11-13 Thread Martin Maechler
> PIKAL Petr > on Tue, 13 Nov 2018 08:42:22 + writes: > Hi > similar result (with different numerical values) could > be achieved by making v a factor. > > v <- letters[c(2,2,1,2,1,1)] > > vf<-factor(v) > > as.numeric(vf) > [1] 2 2 1 2 1 1 > > Cheers > Petr Yes, as

Re: [R] which() function help page precision

2018-11-16 Thread Martin Maechler
> peter dalgaard > on Fri, 16 Nov 2018 13:39:27 +0100 writes: > Well, "Basically, " is an excuse for not being > accurate. Making the code more complex doesn't really help > the explanation. It could be better to just add "(except > for NA handling)" or so. > -pd

Re: [R] R plot split screen in uneven panels

2018-12-13 Thread Martin Maechler
> Bert Gunter > on Wed, 12 Dec 2018 08:51:04 -0800 writes: > Incidentally, here is another way to do what (I think) you asked using > layout(): > m <- matrix(c(1,2,2), nrow =1) > layout(m) > plot(1:10, type = "p", main ="The First Plot") > plot(10:1, type = "l

Re: [R] Webshot failed to take snapshot in Ubuntu machine

2018-12-20 Thread Martin Maechler
., the one that webshot() will then try to use and somehow fails. I'd recommend you run webshot::install_phantomjs() which then should install a "better" version of the 'phantomjs' executable that then *should* work .. Let us know if this helped (or why not). Best, Martin M

Re: [R] Issues with R3.5.2

2018-12-23 Thread Martin Maechler
> Jeff Newmiller > on Sat, 22 Dec 2018 22:31:54 -0800 writes: > You could delete your 3.5 personal package library (using > the File Explorer with Run as Admin if necessary) and > re-install your packages without running as Admin. If that > does not work try uninstalli

Re: [R] I can't get seq to behave how I think it should

2019-01-18 Thread Martin Maechler
tation. Your example here works because the rounding typically happens to end up with the same binary repr ... this all relies on too many details to be recommendable. Martin Maechler ETH Zurich and R Core team >> -Original Message- >> From: R-help On Behalf Of Ben

Re: [R] load.wave q

2019-02-01 Thread Martin Maechler
d, reproducible code. In both of the above URLs it is mentioned that R-help is archived (in many places): Questions and their answers are there for the R community (of the future) who will find and be able to learn from them. Best, Martin Maechler ETH Zurich and R Core team _

Re: [R] Spacing around \cdot (%.%) unequal in pdf

2019-02-08 Thread Martin Maechler
) ## e.g., eaxis(2, at = ypos, labels = pretty10exp(ypos, drop.1=TRUE)) gives a nice plot for me, not using 'cdot' but rather > pretty10exp(ypos, drop.1=TRUE) expression(10^6, 2 %*% 10^6, 3 %*% 10^6) > > Thanks for any hint > Pascal You are welcome! Mart

Re: [R] Unexpected errors in sparse Matrix arithmetic with zero-length dimensions

2019-02-15 Thread Martin Maechler
> Aaron Lun > on Sun, 10 Feb 2019 15:22:17 + writes: > Dear list, > The Matrix package exhibits some unexpected behaviour in its arithmetic > methods for the edge case of a sparse matrix with a dimension of zero > length. The example below is the most illustrative,

Re: [R] Which dependency list to build first?

2019-02-26 Thread Martin Maechler
> Rich Shepard > on Sun, 24 Feb 2019 11:08:43 -0800 writes: > I apologize for the ambiguous subject; I could not think of a more accurate > one. > Updating packages reported that 'later' did not build, but I did not see > which dependency needs updating. Looking at t

Re: [R] [FORGED] Re: Issue with t.test

2019-03-21 Thread Martin Maechler
> Rolf Turner > on Wed, 13 Mar 2019 09:38:24 +1300 writes: > On 13/03/19 9:06 AM, Greg Snow wrote: > >> The only time I have seen t.test give a p-value of 1 is when the >> data mean exactly equals the null hypothesis mean and the alternative >> is the default of

Re: [R] problem with nls....

2019-03-22 Thread Martin Maechler
it's help page, I'm not the author of that function and its submethods: https://www.rdocumentation.org/packages/robustbase/versions/0.93-4/topics/nlrob Martin Maechler ETH Zurich > -- > Best regards, > Ivan > _

Re: [R] Limiting the scope of RNGkind/set.seed

2019-04-16 Thread Martin Maechler
> Elizabeth Purdom > on Tue, 16 Apr 2019 09:45:45 -0700 writes: > Hi Bert, Thanks for your response. What you suggest is > more or less the fix I suggested in my email (my second > version of .rcolors). I writing more because I was > wondering if there was a better way

Re: [R] citation() command doesn't work in R.3.1.1

2014-08-07 Thread Martin Maechler
of thousands of tests that must have run without fault before R is released. Calling citation() and >= 99% of all other base R functions is among these quality assurance tests of an R release. Martin Maechler (R core team) __ R-help@r-project.org

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Martin Maechler
> Have you tried the 'envir' argument to load()? E.g., >envA <- new.environment() >load("A.RData", envir=envA) >envB <- new.environment() >load("B.RData", envir=envB) >plot(A$object, B$object) > Bill Dunlap > TIBCO Software > wdunlap tibco.com An alternative that I have been

Re: [R] "no visible binding for global variable" and with() vs. within()

2014-08-22 Thread Martin Maechler
, but that would be a quite bad idea, IMHO: The checking code {from package 'codetools' BTW} would no longer warn you about any accidental global 'x' variable in any of your functions in your package. After all, these codetools checks *are* very helpful in detecting typos and

Re: [R] loading saved files with objects in same names

2014-08-22 Thread Martin Maechler
(c("f.RData","s.RData"),function(f){getFrom(f,"x")}) > > f.RData s.RData > > "first" "second" > > > > (on second thoughts, possibly 'loadFrom' is a better name) > That's a nice little function. You

Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Martin Maechler
p TIBCO Software wdunlap tibco.com But it does already... I assume you mean it should say *more* than now. I'm open for adding a bit more and thankful for wording suggestions (off line probably). Martin Maechler, ETH Zurich > On Mon, Aug 25, 2014 at 5:00 AM, Dario Strbenac >

Re: [R] Trace and inverse of big matrices

2014-08-25 Thread Martin Maechler
hole computations are done very efficiently using the Matrix - underlying C libraries. I'm interested to hear more about your matrices. To find their sparse, apply nnzeros( M ) and possibly nnzeros(zapsmall( M )) to your matrices M. Also of interest here is isSymmetric(D) Martin Ma

Re: [R] How to use multi paragraph comment like /* and */ in cpp?

2014-09-09 Thread Martin Maechler
> "PS" == PO SU > on Tue, 9 Sep 2014 10:49:32 +0800 writes: PS> Dear expeRts,    I find it's terrible  when  i want to PS> comment multi paragraph (e.g.  a 30 lines function) , i PS> have to comment each line with #,  is there any good way PS> to do that ?    I invest

Re: [R] Median of streaming data

2014-09-24 Thread Martin Maechler
2) Would anybody know of more recent research on the subject? (I quickly "googled around" and found research more geared for the time series situation which is more involved anyway) --> Hence CC'ing the experts' list R-SIG-robust Martin Maechler, ETH Zurich

Re: [R] Median of streaming data

2014-09-26 Thread Martin Maechler
>>>>> Rolf Turner >>>>> on Thu, 25 Sep 2014 11:44:38 +1200 writes: > On 24/09/14 20:16, Martin Maechler wrote: >> 1) has your proposal ever been provided in R? I'd be >> happy to add it to the robustX >> (http://cr

Re: [R] RCurl memory leak in getURL method

2014-10-25 Thread Martin Maechler
> dotnet sql > on Sat, 25 Oct 2014 08:50:20 +1100 writes: > Hi It looks like we have hit a bug in RCurl. The method > getURL seems to be leaking memory. A simple test case to > reproduce the bug is given here: >> library(RCurl) >> handle<-getCurlHandle() >> ra

Re: [R] Trace of product of matrices

2014-10-28 Thread Martin Maechler
> peter dalgaard > on Sun, 19 Oct 2014 21:26:39 +0200 writes: >> On 19 Oct 2014, at 19:00 , Spencer Graves wrote: >> >> On 10/19/2014 8:42 AM, peter dalgaard wrote: On 19 Oct 2014, at 16:43 , Wagner Bonat wrote: Dear, I ha

Re: [R] Trace of product of matrices

2014-10-28 Thread Martin Maechler
>>>>> Berend Hasselman >>>>> on Tue, 28 Oct 2014 11:38:29 +0100 writes: > On 28-10-2014, at 11:05, Martin Maechler wrote: >> …... >> Thank you, Peter, and Spencer. >> >> For a few years now,

Re: [R] plot hclust object

2014-10-28 Thread Martin Maechler
etic() to R which does exactly do this: Provide the distance matrix which is implicitly defined by a hierarchical clustering. Martin Maechler, ETH Zurich > (or extract the distance matrix used to do the clustering > if it is available) and then use multidimensional scaling &

Re: [R] plot hclust object

2014-10-28 Thread Martin Maechler
strongly agree that more \link's would be useful in general and in particular for cophenetic. I'm happy to take suggestions, notably if they already use Rd syntax ... ;-) Martin > On Tue, Oct 28, 2014 at 9:31 AM, Martin Maechler > wrote: >>>>>>> G

Re: [R] problems with mail message

2014-11-18 Thread Martin Maechler
than in an ideal case to solve the situation. Indeed, all the e-mails sent to @r-project.org have to be resent by the original senders. We are very sorry for this grave mishap. Martin Maechler, Statistics (subset) Mathematics (subset) ETH Zurich > Regards > Petr _

Re: [R] duplicated function

2014-11-18 Thread Martin Maechler
ed to ‘match()’: the value to be returned in the case when no match is found. Note that it is coerced to ‘integer’. Value: an integer vector of the same length as ‘v’. Can be used as a ‘factor’, e.g., in ‘split’, ‘tapply’, etc. Author(s): Christoph Buser and

Re: [R] plot.hclust point to older version

2014-11-26 Thread Martin Maechler
Consequently, use R with the '--no-save' command line argument (maybe also with '--no-restore'). ESS (Emacs Speaks Statistics) users can put (custom-set-variables '(inferior-R-args "--no-restore-history --no-save ") ) into their ~/.emacs {and I'd like to s

Re: [R] Using Rmpfr to round with precision in R

2014-11-27 Thread Martin Maechler
on how quickly the new Rmpfr version 0.5-7 gets published on CRAN], and update your Rmpfr package. The problem is fixed in Rmpfr 0.5-7. If you had CC'ed your e-mail to maintainer("Rmpfr") I would have heard of the problem earlier and almost surely have fixed it earlier

Re: [R] plot.hclust point to older version

2014-11-27 Thread Martin Maechler
>>>>> "PP" == PIKAL Petr >>>>> on Thu, 27 Nov 2014 13:40:36 + writes: PP> Hm >> -Original Message- >> From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] >> Sent: Wednesday, November 26, 2014 8:0

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-12-01 Thread Martin Maechler
Thank you for all the thoughts about alleviating these problems, both to us and the "newbies" (or otherwise e-mail clueless subscribers). > Ranjan Maitra > on Sun, 30 Nov 2014 20:37:22 -0600 writes: > Following on Rich and Peter, is it practical for the list to put it at the top

Re: [R] please please unsubscribe!!!!!!!!!!!!!!!!

2014-12-01 Thread Martin Maechler
n: - No header - We replace in the footer the first of the 4 text lines from R-help@r-project.org mailing list to R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see Martin Maechler, ETH Zurich (and R core team). > On Mon, 1 Dec 2014 06:31:14 -0800 Jeff Newmiller

Re: [R] removing outlier --> use robust regression !

2015-09-15 Thread Martin Maechler
> Juli > on Sat, 12 Sep 2015 02:32:39 -0700 writes: > Hi Jim, thank you for your help. :) > My point is, that there are outlier and I don´t really > know how to deal with that. > I need the dataframe for a regression and read often that > only a few outlier

Re: [R] Unexpected/undocumented behavior of 'within': dropping variable names that start with '.'

2015-09-23 Thread Martin Maechler
> Hadley Wickham > on Sun, 20 Sep 2015 14:23:43 -0400 writes: > The problem is that within.data.frame calls as.list.environment with > the default value of all.names = FALSE. I doubt this is a deliberate > feature, and is more likely to be a minor oversight. Indeed; Thank

Re: [R] backsolve, chol, Matrix, and SparseM

2015-09-25 Thread Martin Maechler
Dear Ben, > Benjamin Tyner > on Thu, 24 Sep 2015 13:47:58 -0400 writes: > Hi I have some code which does (on a symmetric matrix 'x') > backsolve(chol(x), diag(nrow(x))) > and I am wondering what is the recommended way to > accomplish this when x is also sparse (

Re: [R] Installing different R versions

2015-10-08 Thread Martin Maechler
> Loris Bennett > on Thu, 8 Oct 2015 12:07:20 +0200 writes: > Dear Luca, Luca Cerone writes: >> Dear Loris and Wolfgang, thanks a lot for the help! >> >> I wasn't aware of the module project. I'd rather use the >> "official" way of having co-existent R versions

Re: [R] CRAN - Package "activity" - how do you convert time (hh:mm) into radians in R 3.1.2 on Windows 7 OS 64bit

2015-11-04 Thread Martin Maechler
and minute) hands, and I think I have only ever seen 12 h watches at least on church towers (yes, here in CH) or wrist watches... (?) Martin (Maechler, ETH Zurich, Switzerland) > On Tue, Nov 3, 2015 at 2:52 PM, Bert Gunter wrote: >> Hint: 24 hours = 24x60 = 1440 minutes = 2

Re: [R] NULL dev.lis()

2015-11-09 Thread Martin Maechler
> Pascal Oettli via R-help > on Mon, 9 Nov 2015 14:18:37 +0900 writes: > Dear Tom, > Running R 3.2.2 on Ubuntu 15.04, if I run dev.list(), I get NULL. Yes, indeed with all "regular" / "default" versions of R. I you don't get that, you must have set something user-specific, o

Re: [R] Why does a custom function called is.numeric.factor break lattice?

2015-11-16 Thread Martin Maechler
> Bert Gunter > on Mon, 16 Nov 2015 08:21:09 -0800 writes: > Thanks Duncan. You are right; I missed this. > Namespaces and full qualification seems the only reliable solution to > the general issue though -- right? Not in this case; full qualification is very very rarel

Re: [R] R runtime performance and memory usage

2015-11-17 Thread Martin Maechler
hings up, the lsfit() function may work > better for you. > Bill Dunlap > TIBCO Software > wdunlap tibco.com or even faster is the extra-simple but fast .lm.fit() function (in R >= 3.1.0). I've written a small demo about it and published it here, http://rpu

Re: [R] stopifnot with logical(0)

2015-12-12 Thread Martin Maechler
about length-0 expressions in stopifnot(). Indeed, in the past, I had thought of "improving" stopifnot() by giving a warning or even stop() for logical(0) expressions, but I quickly dismissed that idea after some experiments. My conclusion: Breaking such a fundamental lemma of logic

Re: [R] stopifnot with logical(0)

2015-12-12 Thread Martin Maechler
>>>>> Hadley Wickham >>>>> on Sat, 12 Dec 2015 08:08:54 -0600 writes: > On Sat, Dec 12, 2015 at 3:54 AM, Martin Maechler > wrote: >>>>>>> Henrik Bengtsson on >>>>>>> Fri, 11 Dec 2015 08:20:55 -

Re: [R] stopifnot with logical(0)

2015-12-14 Thread Martin Maechler
>>>>> "DM" == Duncan Murdoch >>>>> on Sat, 12 Dec 2015 09:05:04 -0500 writes: DM> On 12/12/2015 8:44 AM, peter dalgaard wrote: >> >>> On 12 Dec 2015, at 10:54 , Martin Maechler >>> wrote: >>>

Re: [R] Make a box-whiskers plot in R with 5 variables, color coded.

2015-12-15 Thread Martin Maechler
[] > You are missing the closing bracket on the boxplot() > command. Just finish with a ')' Hmm... I once learned '()' =: parenthesis/es '[]' =: bracket(s) '{}' =: brace(s) Of course, I'm not a native English speaker, and my teacher(s) / teaching material m

Re: [R] dput( list(,..) ) could be improved

2016-01-05 Thread Martin Maechler
(x, file, opts)) Ideally the above code would be replaced by simply .Internal(dput(x, file, opts)) and the C code called in do_dput() in https://svn.r-project.org/R/trunk/src/main/deparse.c would be improved to do the above in C and be properly recursive. (Tested) patches are very welc

Re: [R] printing a data.frame that contains a list-column of S4 objects

2016-01-14 Thread Martin Maechler
D.2 D.3 M.1 M.2 M.3 M.4 1 1 0 0 1 4 7 10 2 0 1 0 2 5 8 11 3 0 0 1 3 6 9 12 and that would be quite inefficient for large sparse matrices. - Final recommendation as a summary: If data.frame(.., .., ..) does not work to put entries into a data f

Re: [R] installing tikzDevice for R 3.2.3

2016-01-16 Thread Martin Maechler
e team are much happier to have a generic https://cloud.r-project.org as "default CRAN mirror". Martin Maechler (as 'Secreatry General' of the R Foundation) > On Fri, 15 Jan 2016 22:42:41 -0600 Yihui Xie > wrote: >> Please do not use http://r-f

Re: [R] config args for Rmpfr to link to mpfr and gmp?

2016-01-20 Thread Martin Maechler
p mailing lsit and ask you to use 'reply to all' such that the topic is kept and dealt with on R-help. I hope you'll enjoy working with the Rmpfr R package, with best regards, Martin Maechler ETH Zurich __ R-help@r-project.org mailing li

Re: [R] Block Triangular Matirx

2016-01-26 Thread Martin Maechler
> David Winsemius > on Mon, 25 Jan 2016 18:13:59 -0800 writes: >> On Jan 24, 2016, at 10:45 PM, Olivier Crouzet >> wrote: >> >> Hi, I think this page will help, >> >> https://stat.ethz.ch/R-manual/R-devel/library/base/html/lower.tri.html > I agree that

Re: [R] Why CLARA clustering method does not give the same classes as when I do clustering manually?

2016-02-22 Thread Martin Maechler
n order to get the variability of random starts. .. more feature requests are welcome! Martin Maechler, ETH Zurich == maintainer("cluster") > If not, then the original > order of the data determines the final result, but the > final result is not necessarily

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-22 Thread Martin Maechler
ample(silhouette) where the silhouettes of pam(ruspini, k = k') , k' = 2,..,6 are displayed, or if you directly look at plot( silhouette(ruspini, k = 6) ) you will notice that pam() itself can easily lead to negative silhouette values. Martin Maechler [ == maintainer

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-22 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 22 Feb 2016 16:48:39 +0100 writes: >>>>> Sarah Goslee >>>>> on Fri, 19 Feb 2016 15:22:22 -0500 writes: >> Ah, my guess about the confusion was wrong, then. You're

Re: [R] How a clustering algorithm in R can end up with negative silhouette values?

2016-02-22 Thread Martin Maechler
er using rngR = TRUE and more than one (random) run so you get a feeling about the influence of the random sample at start. In addition, from the several runs, you could keep the best one. Martin > Best, > Behnam > On Mon, Feb 22, 2016 at 8:09 AM -0800, "Martin

Re: [R] Why does match() treat NaN's as compables; Bug or Feature?

2016-02-29 Thread Martin Maechler
/2) [1] 5 NA 1 1 2 2 3 3 4 4 5 4) A fix for this bug has been committed to R-devel already, a a minute ago. [svn rev 70239] Martin Maechler, ETH Zurich > Bert Gunter > "The trouble with having an open mind is that people keep > coming along an

Re: [R] Version 3.2.3: package not available error with https

2016-02-29 Thread Martin Maechler
om previous > versions of R. These mirrors I can reach. > I assume I have some local, probably firewall-related > problem, yes. I assume other may help you *if* give a bit more information than just your version of R. > but can someone confirm that the HTTPS mirror

Re: [R] Copula Regression

2016-03-01 Thread Martin Maechler
> Janmaat, John > on Tue, 1 Mar 2016 04:53:43 + writes: > Well, seem to have solved own problem. > The article "Enjoy the joy of copulas: with a package copula" has a nice appendix that describes precisely how to set up what I am looking for. The only minor issue is tha

Re: [R] how to get the 'starting directory'

2016-03-02 Thread Martin Maechler
ould learn to distinguish between R and Rstudio+R ( or ESS+R or StatET+R ). The more sophisticated these GUIs become, the more often we have to make this distinction, unfortunately, as the price for sophistication unfortunately is typically paid by more bugs. This is not just the case for R

Re: [R] Persistent state in a function?

2016-03-21 Thread Martin Maechler
> Duncan Murdoch > on Sat, 19 Mar 2016 17:57:56 -0400 writes: > On 19/03/2016 12:45 PM, Boris Steipe wrote: >> Dear all - >> >> I need to have a function maintain a persistent lookup table of results for an expensive calculation, a named vector or hash. I know that I

Re: [R] Reshaping an array - how does it work in R

2016-03-22 Thread Martin Maechler
etattr to modify the > dimensions in place (i.e., without making a copy). Risk: if you modify > an object by reference, all other objects which point to the same memory > address will be modified silently, too. Martin Maechler, ETH Zurich (and R-core) > HTH, >

Re: [R] Memory usage in prcomp

2016-03-22 Thread Martin Maechler
> Roy Mendelssohn <- NOAA Federal > > on Tue, 22 Mar 2016 07:42:10 -0700 writes: > Hi All: > I am running prcomp on a very large array, roughly [50, 3650]. The array itself is 16GB. I am running on a Unix machine and am running “top” at the same time and am quite surpri

Re: [R] adding points in plot loop --> try using matplot() !

2016-03-23 Thread Martin Maechler
umns of a numeric matrix and solve the xlim/ylim problem for you. As the above R code is not reproducible (we do not have your 'ext'), I have not tried if your use of "rownames"/"colnames" is easily portable to matplot. If not (which I doubt), just take matplot()

Re: [R] Is there dpois equivalent for zero-inflated Poisson?

2016-03-23 Thread Martin Maechler
-not-submitted paper available as one of the Rmpfr vignettes at https://cloud.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf BTW: There are at least 3-4 R packages which deal with zero-inflated poisson in some ways, notably the recommended 'mgcv' package which c

Re: [R] Reshaping an array - how does it work in R

2016-03-23 Thread Martin Maechler
>>>>> Dénes Tóth >>>>> on Tue, 22 Mar 2016 10:55:58 +0100 writes: > Hi Martin, > On 03/22/2016 10:20 AM, Martin Maechler wrote: >>>>>>> >>>>>Dénes Tóth >>>>>>> >>>>&

Re: [R] Why missing values are not allowed in 'poly'?

2016-03-24 Thread Martin Maechler
, though it's a pity for us! --- but you can, Liviu! So, and as you see at every startup of R : "R is a collaborative project with many contributors." I'm willing to try "good-looking" patches. (to the *sources*, *NOT* to a printout of the function in your R con

Re: [R] Robust ANCOVA

2016-03-28 Thread Martin Maechler
t;robustbase") require("robustbase") fm <- lmrob(Post ~ pre +IV1 + IV2, setting = "KS2014", data=yourdataframe) where recent research lead to the recommendation of setting="KS2014", which indeed maybe relevant for "ANCOVA". Martin Mae

Re: [R] R.squared in summary.lm with weights

2016-04-09 Thread Martin Maechler
nd 'glm' methods are hidden. Of course I do recommend reading the real R source code (which also contains the comments and has some logical order in all the function definitions), but you can use stats ::: influence.lm to show a version of the f

Re: [R] simple interactions

2016-04-15 Thread Martin Maechler
Please use R 3.2.4 or newer, notably for dummy.coef() which was improved (made more generally working) for R 3.2.4, notably thanks to my colleague Werner Stahel. Best regards, Martin -- Martin Maechler, ETH Zurich > Yes, I can reconstruct these from the original fit, but I >

Re: [R] Matrix: How create a _row-oriented_ sparse Matrix (=dgRMatrix)?

2016-04-20 Thread Martin Maechler
u want, as(sparseMatrix(.), "RsparseMatrix") should give you what you want reliably and efficiently. > Am I doing some wrong here? Or is this what means that the package is > optimized for the column-oriented representation and I shouldn't > really work with

Re: [R] [Rd] paths for install and libraries?

2016-04-29 Thread Martin Maechler
> Dalthorp, Daniel > on Thu, 28 Apr 2016 16:41:28 -0700 writes: > I've written a fairly elaborate package (called "eoa") > that relies on functions from several other packages. I've > built the package into a zip file on Windows using > Hadley's devtools::build(binary

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-02 Thread Martin Maechler
> Mike Smith > on Sun, 1 May 2016 08:15:44 +0100 writes: On Apr 30, 2016, at 12:58 PM, Mike Smith wrote: Hi First post and a relative R newbie I am using the vioplot library to produce some violin plots. DW> It's a package,

Re: [R] Removing NAs from dataframe (for use in Vioplot)

2016-05-02 Thread Martin Maechler
g > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > On Mon, May 2, 2016 at 1:49 AM, Martin Maechler > wrote: >>>>>>> Mike Smith >>>>>>> on

Re: [R] greek characters in Figures

2016-05-02 Thread Martin Maechler
t and there are many packages available .. Googling about R problems often does not lead to the best solutions. In this case do ?plotmath and see that you do *NOT* need to install any extra packages. You do have 29 R packages installed with your R installation, you already have several 1000s R fu

[R] Antwort: Re: selecting columns from a data frame or data table by type, ie, numeric, integer

2016-05-04 Thread Martin Maechler
t;, contains="numeric") > N <- Num(1:10) > N An object of class "Num" [1] 1 2 3 4 5 6 7 8 9 10 > if(class(N) == "numeric") "yes" else "no" [1] "no" > I hope that many of the

Re: [R] break string at specified possitions

2016-05-12 Thread Martin Maechler
gt; > I think you can simply this. just create a function (I'll call it begs) > to compute the beginning positions. > > begs <- function(x) c(0,x[-length(x)])+1 > > Then, then use that function in your call to str_sub > > str_sub(test_string,b

[R] Antwort: Re: Re: Antwort: Re: Re: sink(): Cannot open file

2016-05-12 Thread Martin Maechler
> Hi Sarah, > yes, I followed your suggestion. I doubt that you followed it correctly. Sarah's advise is usually really very sound -- and your code below is *not* : > If I do exactly what is in the example of the documentation: > sink("C:/Temp/sink-examp.txt") > i <- 1:10 > outer(i, i, "*") > s

Re: [R] Warning when running R - can't install packages either

2016-05-17 Thread Martin Maechler
> > system-wide profile. Is this correct, or a misinformation? Short executive summary to all the nice explanations and examples (by the other Martin M) below: Yes, this is misinformation. You should *NOT* set R_HOME in a (system wide / user) profile. Martin Maechler

Re: [R] sort()ing strings

2016-10-13 Thread Martin Maechler
> Bob O'Hara > on Thu, 13 Oct 2016 11:55:04 +0200 writes: > Yes, thanks. That seems to be it: > thing <- c("M1", "M2", "M.1", "M.2") >> sort(thing) > [1] "M1" "M.1" "M2" "M.2" which I do find strange, indeed, given your sessionInfo which contains LC_COLLATE=e

<    1   2   3   4   5   6   7   8   9   >