Re: [R] fast matrix-vector multiplication

2009-12-14 Thread Martin Maechler
and a data frame. With > library(Matrix) > example(sparse.model.matrix) you get a few (small sample) examples. Martin Maechler, ETH Zurich GC> -Gray GC> On Monday, December 14, 2009, parkbomee wrote: >> >> >> Hi all, >> >>

Re: [R] Odp: Loop counter used in variable

2009-12-15 Thread Martin Maechler
> "PP" == Petr PIKAL > on Tue, 15 Dec 2009 09:03:11 +0100 writes: PP> Hi PP> r-help-boun...@r-project.org napsal dne 15.12.2009 00:25:10: >> >> Hi All, >> >> I need to run muliple lm functions. My independent variables are called >> dataset$x1, x2, x3,

Re: [R] Problem with expand.grid

2009-12-23 Thread Martin Maechler
"y" "t" "Batch" "T" ... ..$ dimnames:List of 7 .. ..$ y: chr "y=4.75587" "y=4.84510" "y=5.04139" "y=4.85733" ... .. ..$ t: chr "t= 0" "t= 48" "t=144" "t=192&qu

Re: [R] silhouette: clustering labels have to be consecutive integers starting

2009-05-13 Thread Martin Maechler
onto this e-mail thread, and indeed found fixed the problem. Version 1.12.0 of 'cluster' should become visible within a few days, and will allow to call silhoutte(g, dis) on a grouping vector of k different integer values which need *not* necessarily be in 1:k. Martin Maechler, ET

Re: [R] Printing to screen a matrix or data.frame in one chunk (not splitting columns)

2009-05-15 Thread Martin Maechler
atically set the width to the current buffer ("window") size, by M-x ess-execute-screen-options or, for everyone here who has (add-hook 'ess-mode-hook'ess-add-MM-keys) (add-hook 'inferior-ess-mode-hook 'ess-add

Re: [R] fitdistr for t distribution

2009-05-16 Thread Martin Maechler
> "l" == lagreene > on Fri, 15 May 2009 04:22:59 -0700 (PDT) writes: l> Thanks Jorge, l> but I still don't understand where they come from. when I use: l> fitdistr(mydata, "t", df = 9) and get values for m and s, and the variance l> of my data should be the df/s?

Re: [R] Matrix package,solve() errors and crashes Please help

2009-05-16 Thread Martin Maechler
cial in the case where A is sparse matrix: solve(A) is never sparse for sparse A (*), but solve(A, b) can happen with a fast (and memory-efficient) algorithm, and that's what happens also when you use the Matrix package. I append a version of your function that is also slightly improved in

Re: [R] (no subject)

2009-05-18 Thread Martin Maechler
ing that we do not "allow" more than two beginner's questions per day for a specific beginner ... In spite of the above: Congratulations on chosing R, wishing you "happy houRs" ! Regards, Martin Maechler, ETH Zurich __ R

Re: [R] stringsAsFactors param in expand.grid not working

2009-05-19 Thread Martin Maechler
earch the >> R list to >> see if this has been mentioned before, and it looks like it hasn't. Yes, thank you. That's a bug on which we (R-core) currently work. More about this, and notably about Rolf's (.)*&^%)(&#%$) proposal on the R-devel

Re: [R] Discovery on packages

2009-05-26 Thread Martin Maechler
S+ or the *equivalent*, slightly more intuitive, R - only help(package = TTR) Martin Maechler, ETH Zurich PS> On Tue, 26 May 2009, JannaB wrote: >> If I download a package -- how can I explore what it does? For >> instance, I downloaded the TTR package of off CRAN

Re: [R] Bug in hist() when working with Dates ?

2009-06-02 Thread Martin Maechler
use str(h <- hist(d., "days", include.lowest=FALSE)) {which gives an error now}, namely to effectively use what you now can get via str(hist(d., breaks= seq(min(d.)-1, max(d.), "days"))) {hint: the above is the solution for your problem} (make check-devel) tested patches to

Re: [R] Problem with generic methods

2009-06-08 Thread Martin Maechler
Year,numeric-method is defined to invoke the beginYear >> generic, so you end up calling yourself. You might have meant >> >>  setMethod(beginYear, signature(object="numeric"), beginYear.Fun) RMK> That's it exactly. well, as Martin Morgan to

Re: [R] "R CMD check" does not find a mistake

2009-06-09 Thread Martin Maechler
l package authors : Subject: [Rd] R-devel:codocClasses() now finds more --> R CMD check warnings Date: Wed, 3 Jun 2009 11:45:45 +0200 i.e. only 6 days before you saw the problem yes, I am sometimes too optimistic, assuming that people actually read what I write

Re: [R] Unable to load package:lme4 [ Ubuntu 9.04 ]

2009-06-10 Thread Martin Maechler
show you the version of Matrix you need at least. Ideally you'd upgrade your version of R (to 2.9.0) as well, since the latest couple of versions of Matrix all have "R >= 2.9.0" in their dependency requirements. Regards, Martin Maechler GAR> Thanks, GAR> -Giri

Re: [R] Unable to load package:lme4 [ Ubuntu 9.04 ]

2009-06-10 Thread Martin Maechler
'cholmod_start' not provided by package 'Matrix' GAR> Error: package/namespace load failed for 'lme4' GAR> >> packageDescription("lme4") GAR> Package: lme4 GAR>

Re: [R] "R CMD check" does not find a mistake

2009-06-10 Thread Martin Maechler
>>>>> "MM" == Martin Maechler >>>>> on Wed, 10 Jun 2009 08:50:46 +0200 writes: >>>>> "CG" == Christophe Genolini >>>>> on Tue, 09 Jun 2009 16:17:15 +0200 writes: CG> Hi the list, I build a package

Re: [R] [R-pkgs] package installation fails (RandomFields)

2009-06-11 Thread Martin Maechler
[[ NOTE: This accidentally was approved to go to R-packages, it should never have gone there, and I have deleted it from the archives. Please *only* reply to R-help (and the OP)! ]] > "DH" == Drew Hoysak > on Wed, 10 Jun 2009 14:40:32 -0500 writes: DH> I

Re: [R] Tables without names

2009-06-12 Thread Martin Maechler
>> is recommended? DM> I would use as.numeric(), but I don't claim it's DM> standard. many months ago in a discussion about the use (and "misuse") of c() for coercing arrays/matrices to (atomic) vectors, Brian Ripley I think advertized the use of as.ve

[R] R-project mailing lists (and SVN) - timeout Sunday 21 June

2009-06-20 Thread Martin Maechler
he website http://www.math.ethz.ch As soon as this site is up again, all the servers and dervices should be back online (within a small delay). ----- Martin Maechler, ETH Zurich http://stat.ethz.ch/people/maechler Seminar für Stat

[R] png() resolution problem {was "Silhouette ..."}

2009-06-20 Thread Martin Maechler
g("bar.bng") with png("bar.bng", res = 1200) did not help, as we now get the infamous Error in plot.new() : figure margins too large Other R-help readers will be able to make the png() example work for such cases, where you need so many lines. {but let's stick with

Re: [R] Roxygen vs Sweave for S4 documentation

2009-06-22 Thread Martin Maechler
> "TobiasV" == Tobias Verbeke > on Sun, 21 Jun 2009 08:25:07 +0200 writes: TobiasV> Hi Ken, >> I have been using R for a while. Recently, I have begun converting my >> package into S4 classes. I was previously using Rdoc for documentation. >> Now, I am looking to us

Re: [R] Roxygen vs Sweave for S4 documentation

2009-06-22 Thread Martin Maechler
>>>>> "DM" == Duncan Murdoch >>>>> on Mon, 22 Jun 2009 09:41:12 -0400 writes: DM> On 6/22/2009 9:23 AM, Tobias Verbeke wrote: >> On Mon, Jun 22, 2009 at 2:18 PM, Douglas Bates wrote: >>> On Mon, Jun 22, 2009 at 7:12

Re: [R] [cluster package question] What is the "sum of the dissimilarities" in the pam command ?

2009-03-30 Thread Martin Maechler
>>>>> "TG" == Tal Galili >>>>> on Sun, 29 Mar 2009 03:09:17 +0300 writes: TG> Hello Martin Maechler and All, TG> A simple question (I hope): TG> How can I compute the "sum of the dissimilarities" that appears in the pa

Re: [R] "digits" in round()

2009-03-31 Thread Martin Maechler
m peculiar, but I hope that in the mean time we have squished all real bugs here. *) such as platform (in)dependency; S - back-compatibility, .. Best regards, Martin Maechler, ETH Zurich __ 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] How to generate natural cubic spline in R?

2009-04-01 Thread Martin Maechler
ssume it does, as I assume Frank Harrell will have known about ns()), in order to solve the OP's problem, I still believe that "standard R" [and "good old S version 3 for that matter] contains all functionality needed. Martin Maechler, ETH Zurich SK> Best, SK> Stepha

Re: [R] How to generate natural cubic spline in R?

2009-04-01 Thread Martin Maechler
onably short list to consider. Just a quick note with a small correction: 'splines' is *not* a CRAN, but a "standard R" aka "base R" package that has "always" been "with us", and in my eyes contains (almost IIRC) everything you&#x

Re: [R] How can I use R through command line?

2009-04-01 Thread Martin Maechler
BATCH test.R or Rscript test.R (or " r test.R " if you have installed 'littler' ) Martin Maechler, ETH Zurich r> 2009/4/1 minben : >>  Suppose I have written a R program and saved it in test.R . How can I >> call the program in the com

Re: [R] Recommended packages for a statistician

2009-04-06 Thread Martin Maechler
> "LV" == Luc Villandre > on Mon, 06 Apr 2009 10:42:34 -0400 writes: LV> Hi, LV> Pretty hard to say. It really depends on what you want to. LV> MASS, nlme, lme4 and Hmisc are packages I use on a daily basis. Note that MASS is part of the VR bundle, and that and nlme are

Re: [R] Turning off warnings from cor.test

2009-04-17 Thread Martin Maechler
ral years now. Hence, I'd strongly recommend suppressWarnings( cor.test(c(1,2,3,3,4,5), c(1,2,3,3,4,5), method = "spearman") ) instead of the above. Regards, Martin Maechler, ETH Zurich DR> I hope it helps. DR> Best, DR>

Re: [R] Monotone Transformation

2009-04-18 Thread Martin Maechler
4,] 0.5698602 FJ> Does anybody have any idea whether I could do the similar thing in R? If I FJ> can do it, which function I should use? I don't know what exactly you want, and I'd never want to read SAS code to understand your question, but it could be that isoreg() ca

Re: [R] Matrix package,solve() errors and crashes

2009-04-21 Thread Martin Maechler
t provided (in your e-mail) a fully reproducible example, so I am not sure how exactly you got the memory problem (or even worse the "crash"es). Regards, Martin Maechler, ETH Zurich (co-maintainer of 'Matrix'). SS> I got help from IGRAPH community to use sparse M

Re: [R] using Rmath in c-functions of R packages

2009-04-22 Thread Martin Maechler
applications and not for R packages. VM> I am not sure how I would do this without Rmath. (Re)read "Writing R Extensions". The math functions are (almost) all part of the exported API! The relevant chapter in the extensions manual is currently called 'The R API: entry point

Re: [R] bug when subtracting decimals?

2009-04-22 Thread Martin Maechler
s worse (in older R versions): it gave sometimes too little digits, sometimes too many, whereas now it is at least consistently giving "too little". But the effect is that in ch <- as.character(x) , ch may contain duplicated entries even for unique x, e.g., for x <- c(1, 1 + 4e-16

Re: [R] large factorials

2009-04-23 Thread Martin Maechler
vQ> if you really really need to have it done from within r, vQ> you may want to use an external facility such as bc, the vQ> 'basic calculator' [1,2]. for example, use the vQ> (experimental!) r-bc: vQ> source('http://r-bc.googlecode.com/svn/trunk/R/bc.R') vQ> (you c

Re: [R] About Matrix

2009-04-28 Thread Martin Maechler
C matrix which is The remaining matrix after removing B from A? Your question can be read as asking for C <- B - A but probably that's not what you mean. Please be more exact, and ___following the posting guide (see URL below!!)__ probably use an *explicit* example where e.g. A is 13

Re: [R] correlation coefficient

2009-04-28 Thread Martin Maechler
> "BN" == Benedikt Niesterok > on Tue, 28 Apr 2009 15:33:02 +0200 writes: BN> Hello, BN> I would like to get a correlation coefficient (R-squared) for my model. {{ arrrgh... how many people think they "need" an R^2 when they fit a model ?? }} BN> I don't kno

Re: [R] plot.lm cex.caption

2009-04-29 Thread Martin Maechler
grade your R! H> In my R help, I noticed the cex.caption doesn't appear compared to the help H> I found online. [ . ] H> Do you have a solution? yes, see above. H> Thank you very much you're welcome. Martin Maechler, ETH Zurich

Re: [R] Division ?

2009-05-04 Thread Martin Maechler
s see "all" digits, he should use something like options(digits= 20) in his R startup setting, e.g. in his Rprofile, see ?Startup. Note however: Quite a few experienced R users rather do *REDUCE* the default number of digits printed, rather than enlarge them. (I don

Re: [R] sparseM and kronecker product_R latest version

2010-01-11 Thread Martin Maechler
ssia As a side note: As co-author of R package 'Matrix' in to which we have put a large amount of work and which is nowadays a recommended package (i.e., also part of every R distribution), I do wonder why you don't use 'Matrix' for sparse matrix computing in R. Best regar

Re: [R] Strange behaviour of as.integer()

2010-01-11 Thread Martin Maechler
nite* precision not just arbitrary precision, or then *symbolic* computation, as I assume the following does MT> However, Wolfram Alpha will return the correct answer: MT> http://tr.im/1plus1equals2 BTW: I see that I seem to have forgotten to upload the somewhat n

Re: [R] sparseM and kronecker product_R latest version

2010-01-12 Thread Martin Maechler
98)) identical(D, D.) ##--> TRUE ## and, e.g., > Dk <- kronecker(D, Diagonal(x=5:2)) > identical(Dk, D %x% Diagonal(x = 5:2)) [1] TRUE > dim(D) [1] 113289 36698 > dim(Dk) [1] 453156 146792 > Regards, Martin Maechler, ETH Zurich

Re: [R] Symmetric Matrix classes

2010-01-19 Thread Martin Maechler
Scanning for 'Matrix' in old R-help e-mail, I found > "GA" == Gad Abraham > on Fri, 27 Nov 2009 13:45:00 +1100 writes: GA> Hi, GA> I'd like to store large covariance matrices using Matrix classes. GA> dsyMatrix seems like the right one, but I want to specify just the

Re: [R] how to get a numeric vector?

2020-10-05 Thread Martin Maechler
> Avi Gross via R-help > on Sun, 4 Oct 2020 19:50:43 -0400 writes: > Always hard to tell if THIS is a homework project. As with > most things in R, if you can not find at least a dozen > ways to do it, it is not worth doing. > The question (way below) was how to take

Re: [R] [External] Re: unable to access index for repository...

2020-10-09 Thread Martin Maechler
7; package with a newer version of R and vice verso) and tell us about it. Thank you in advance on being careful and rational about such findings. With regards, Martin Maechler ETH Zurich and R core team > Not knowing how different your versions of maxLik are > between, I wil

Re: [R] Small R documentation bug in ?anyDuplicated

2020-12-07 Thread Martin Maechler
> Bert Gunter > on Sun, 6 Dec 2020 08:23:44 -0800 writes: > All: I did not want to bother R folks for an R Bugzilla > account, so I'll just note what appears to be a > documentation bug here > In R version 4.0.3, ?anyDuplicated says: "anyDuplicated(.) > is a “gene

Re: [R] Help with connection issue for R (just joined, leading R for our agency)

2020-12-09 Thread Martin Maechler
> Bert Gunter > on Tue, 8 Dec 2020 14:54:10 -0800 writes: > R and RStudio are separate products developed and > supported by separate organizations, although obviously > there is a large intersection between the > two. Nevertheless, if you think this is an RStudio rela

Re: [R] Meta: R-Help reply-to

2020-12-17 Thread Martin Maechler
> Jeff Newmiller > on Tue, 15 Dec 2020 10:54:00 -0800 writes: > For the record: this is not nearly as cut-and-dried as you > imply. The current settings actually make replying > off-list rather tricky for some mail clients... I have > tried and failed a few times to re

Re: [R] Error when calling R from Python

2021-01-26 Thread Martin Maechler
> Marcel Baumgartner > on Tue, 26 Jan 2021 08:55:48 +0100 writes: > Dear all, my colleague posted our issue on stackoverflow: > Calling R script from Python does not save log file in > version 4 - Stack Overflow > [https://stackoverflow.com/questions/65887485/calling

Re: [R] Error when calling (R 4.0.x on Windows) from Python

2021-01-27 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 26 Jan 2021 12:37:58 +0100 writes: >>>>> Marcel Baumgartner >>>>> on Tue, 26 Jan 2021 08:55:48 +0100 writes: >> Dear all, my colleague posted our issue on stackoverfl

Re: [R] random numbers with constraints

2021-01-28 Thread Martin Maechler
> Abby Spurdle > on Thu, 28 Jan 2021 08:48:06 +1300 writes: > I note that there's a possibility of floating point errors. > If all values have one digit after the decimal point, you could replace: > qexp (p, rate) with round (qexp (p, rate), 1). > However, sometimes u

Re: [R] arima/fixed

2021-01-30 Thread Martin Maechler
> Rolf Turner > on Sat, 30 Jan 2021 16:11:32 +1300 writes: > On Fri, 29 Jan 2021 12:47:25 + > Nasia Petsa wrote: >> Dear all, >> >> I have the following problem with determining the argument fixed in >> arima function. What is the length of argument fix

Re: [R] arima/fixed

2021-02-01 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Sat, 30 Jan 2021 12:21:14 +0100 writes: >>>>> Rolf Turner >>>>> on Sat, 30 Jan 2021 16:11:32 +1300 writes: >> On Fri, 29 Jan 2021 12:47:25 + Nasia Petsa >> wrot

Re: [R] readline in function call with space in prompt.

2021-02-09 Thread Martin Maechler
> Jeremie Juste > on Mon, 08 Feb 2021 14:28:33 +0100 writes: > Hello, > I have noticed a behavior that I don't understand. When I call the > following function from the prompt. > test <- function(){ > a <- readline("selection: ") > a > } >> test()

Re: [R] quantile from quantile table calculation without original data

2021-03-08 Thread Martin Maechler
> Jeff Newmiller > on Fri, 05 Mar 2021 10:09:41 -0800 writes: > Your example could probably be resolved with approx. If > you want a more robust solution, it looks like the fBasics > package can do spline interpolation. base R's spline package does spline interpolation

Re: [R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-07 Thread Martin Maechler
ely a bit hidden nowadays, (not the least because CRAN still uses frames (würg!!)): https://cloud.r-project.org/bin/linux/debian/ A very nice and useful page, much underrated and underused, probably. Best regards, Martin Maechler ETH Zurich and R Core Team > When I google around for

Re: [R] Matrix::solve() with 1-d arrays -- treating "array" as "numeric"?

2021-04-17 Thread Martin Maechler
> Deepayan Sarkar > on Fri, 16 Apr 2021 11:34:20 +0530 writes: > I get what I initially thought was unexpected behaviour from: > x <- tapply(runif(100), sample(5, 100, TRUE), mean) > solve(Diagonal(5), x) > # Error: not-yet-implemented method for solve(, ). > # -

Re: [R] Matrix::solve() with 1-d arrays -- treating "array" as "numeric"?

2021-04-19 Thread Martin Maechler
>>>>> Deepayan Sarkar >>>>> on Mon, 19 Apr 2021 09:56:58 +0530 writes: > On Sat, Apr 17, 2021 at 9:08 PM Martin Maechler > wrote: >> >> >>>>> Deepayan Sarkar >>>>> on Fri, 16 Apr 2021 11:

Re: [R] Solving a quadratically constrained linear program with inital values

2021-05-18 Thread Martin Maechler
I have no idea whether your query even makes > mathematical sense.) Indeed, it *does* make sense; at least for the case of positive (semi-)definite \Sigma which we may well assume for the moment. Martin Maechler > Bert Gunter > "The trouble with having an open mind is that

Re: [R] Beginner problem - using mod function to print odd numbers

2021-06-09 Thread Martin Maechler
fooverse): Use num[num %% 2 == 1] instead of much slower and ...@#^$ num[ifelse(num %% 2 == 1, TRUE, FALSE)] Martin Maechler ETH Zurich > On Sat, Jun 5, 2021 at 2:05 PM William Michels via R-help > wrote: >> >> > i <- 1L; span <- 1:100; result <-

Re: [R] density with weights missing values

2021-07-13 Thread Martin Maechler
tthias Gondan > Betreff: Re: [R] density with weights missing values > Does your copy of R say that the weights must add up to 1? > ?density doesn't say that in mine. But it does check. another small part to could be improved, indeed, thank you, Richard. -- Martin

Re: [R] Formula compared to call within model call

2021-08-11 Thread Martin Maechler
ble if the user uses the accessor functions: identical(formula(m1), formula(m2)) # TRUE ! ## and indeed, the formula() method for 'lm' does set the environment: stats:::formula.lm -- Martin Maechler ETH Zurich and R Core __ R-help@r-proj

Re: [R] Query regarding stats/p.adjust package (base) - specifically 'Hochberg' function

2021-08-24 Thread Martin Maechler
> Bert Gunter > on Tue, 24 Aug 2021 10:50:50 -0700 writes: > 1. No Excel attachments made it through. Binary > attachments are generally stripped by the list server for > security reasons. > 2. As you may have already learned, this is the wrong > forum for statist

Re: [R] Windows: start script but keep being in R-shell after finish

2021-09-22 Thread Martin Maechler
> Duncan Murdoch > on Tue, 21 Sep 2021 09:09:40 -0400 writes: > On 21/09/2021 3:12 a.m., c.bu...@posteo.jp wrote: >> Hello together, >> >> I was using R some years ago and I am sorry for asking such a dumb >> question. I found some help instructions about commandl

[R] Sebastian Meyer joins the R core team

2021-10-14 Thread Martin Maechler
We are very happy to announce that Sebastian Meyer (http://www.imbe.med.uni-erlangen.de/ma/S.Meyer ; Twitter @bastistician; also https://github.com/bastistician/) has joined the R core team yesterday (Oct 13). He has been an active contributor notably in handling and fixing R

Re: [R] Replacing NA s with the average

2021-10-19 Thread Martin Maechler
you are already aware that 'mean imputation' should rarely be used): > citation(package="mice") To cite mice in publications use: Stef van Buuren, Karin Groothuis-Oudshoorn (2011). mice: Multivariate Imputation by Chained Equations in R. Journal of Statistical Software,

Re: [R] Do not show a "message d'avis" that qbeta reports

2021-10-20 Thread Martin Maechler
er help, you could contact someone on > that list. > Duncan Murdoch Indeed. Currently, the French team is just one person, and maybe they will be happy to share the workload or to get another pair of eyes to look at it... Martin Maechler > On 20/10/2021 6:47 a.m., Marc Girondot

Re: [R] KeyboardSimulator mouse.get_cursor() Not Working

2021-10-26 Thread Martin Maechler
PC" "x86-64" > "JSparks" user effective_user "JSparks" "JSparks" BTW: A package *only* available on Windows What was the answer of maintainer("KeyboardSimulator") when you asked him about the problem? This is *the* approach to take fir

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Jeff Newmiller > on Wed, 27 Oct 2021 11:43:08 -0700 writes: > Sounds right, though the OP appears to be assuming that the code used to generate the data objects in the file will also be there, and we need to be more definitive about that: it is not. Depending how the code was

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Bert Gunter > on Wed, 27 Oct 2021 10:47:14 -0700 writes: > See ?load, but you may be confused. Strictly speaking, there is no code in > an .Rdata file, only a (typically binary, but possibly ascii) > representation of objects, usually as produced by ?save. Of course,

Re: [R] customize the step value

2021-10-29 Thread Martin Maechler
> Duncan Murdoch > on Fri, 29 Oct 2021 09:07:31 -0400 writes: > On 29/10/2021 4:34 a.m., PIKAL Petr wrote: >> Hi >> >> One has to be careful when using fractions in seq step. >> >> Although it works for 0.5 >>> (seq(0,10, .5) - round(seq(0,10,.5),2))==0

Re: [R] typo in documentation for array // how to report such

2021-11-01 Thread Martin Maechler
erienced members would know how to efficiently address this. .. and yes, I've added the missing "be" now ... but (of course) not in time for the release of R 4.1.2 which is planned for today. Martin Martin Maechler ETH Zurich and R Core team

Re: [R] extracting a R object from an R image

2021-11-06 Thread Martin Maechler
> Jeff Newmiller > on Fri, 05 Nov 2021 16:45:02 -0700 writes: > IMO you are being a bit too literal. It is absolutely possible to load the file into a dedicated environment and use the $ or [[]] extraction operator to access a specific object in that environment. > ?load

Re: [R] GPL or not (was "(no subject)")

2021-11-10 Thread Martin Maechler
.g., testthat, actuar, pryr, vetr, DPQ, round, ... {I count about 80 CRAN packages} Martin -- Martin Maechler ETH Zurich and R Core team > Le mar. 9 nov. 2021 à 22:51, Duncan Murdoch a écrit : >> >> On 09/11/2021 3:52 p.m., Jeff Newmiller wrote: >>

Re: [R] Forwarding missing arguments to the `[` method

2021-12-09 Thread Martin Maechler
> Ivan Krylov > on Wed, 8 Dec 2021 16:52:00 +0300 writes: I have always learnt a lot about programming when reading other people's code .. notably if those people new what they are doing. In this case, studying R-core's `[.data.frame` and `[<-.data.frame` {or for S4 methods, the

Re: [R] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
ews.. ? > My question would now be if this warrants a bug report? I don't think so. As I'm saying above, I think this has rather been a bug fix, making R more universal / less platform-dependent. Last but not least: You'd ideally update more than every 2.5 years... Bes

[R] Call for proposals to organize useR! 2023 as a hybrid conference

2021-12-20 Thread Martin Maechler
Dear All, The R Foundation Conference Committee invites proposals to organize useR! 2023 as a hybrid conference: https://www.r-project.org/conferences/useR_2023_call.html The call is open to hosts worldwide and the deadline for outline proposals is **Friday 28 January 2022**. Any queries s

Re: [R] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 20 Dec 2021 09:46:23 +0100 writes: >>>>> Mario Reutter >>>>> on Sat, 18 Dec 2021 15:55:37 +0100 writes: >> Dear everybody, >> I'm a researcher in the field of

Re: [R] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
> Bill Dunlap > on Mon, 20 Dec 2021 08:40:04 -0800 writes: >> >> > Why would one ever *add* a final unneeded path separator, >> > unless one wanted it? >> > Good question, but it is common for Windows installer programs to add a > terminal backslash to PATH

Re: [R] Adding SORT to UNIQUE

2021-12-20 Thread Martin Maechler
> Rui Barradas > on Mon, 20 Dec 2021 17:05:33 + writes: > Hello, > Package stringr has functions str_sort and str_order, both with an > argument 'numeric' that will sort the numbers correctly. > Maybe that's what you are looking for, see the example below. >

Re: [R] How to create density ellipses with R

2022-01-14 Thread Martin Maechler
Hth -- Gerrit Also, with Recommended packages 'cluster' and its ellipsoidPoints() function: The result of library(cluster) example(ellipsoidPoints) is the attached plot with a classical and robust (via recommend pkg 'MASS') covariance ellipse drawn. Be

Re: [R] function problem: multi selection in one argument

2022-01-25 Thread Martin Maechler
is helps, > Rui Barradas Thank you, Rui! Note that your base R solution can be vastly simplified : > f6 <- function(data, ...) table(data[, unlist(list(...))]) > f6(mtcars, "am", "cyl") cyl am 4 6 8 0 3 4 12 1 8 3 2 > If you started

Re: [R] [External] Weird behaviour of order() when having multiple ties

2022-01-31 Thread Martin Maechler
> Stefan Fleck > on Sun, 30 Jan 2022 21:07:19 +0100 writes: > it's not about the sort order of the ties, shouldn't all the 1s in > order(c(2,3,4,1,1,1,1,1)) come before 2,3,4? because that's not what > happening aaah.. now we are getting somewhere: It looks you have alway

Re: [R] pam() with more general dissimilarity / distance

2022-04-08 Thread Martin Maechler
se the correct distance between your observational units, After that you can use the computed distance / dissimilarity matrix (the `dx`) in you call to pam(): px <- pam(dx, k=., ) I hope this helps you. With best regards, Martin -- Martin Maechler ETH Zurich ‪ ___

Re: [R] glm with family binomial and link identity

2022-04-28 Thread Martin Maechler
TLDR: No, there was no such change in R 4.2.0 > Ralf Goertz > on Wed, 27 Apr 2022 10:27:33 +0200 writes: > Hi, > I just noticed that (with my version 4.2.0) it is no longer possible to > use glm with family=binomial(link=identity). Why is that? It was > possible with

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-01 Thread Martin Maechler
> Ashim Kapoor > on Wed, 1 Jun 2022 11:24:21 +0530 writes: > Dear All, > I upgraded to R 4.2.2 on Debian 10 today. Well, I assume you mean R 4.2.0 .. at least that one exists. > The R shell incantation worked fine and all libraries would load but, > I needed to point t

Re: [R] R_LIBS var needed to be set after upgrade to R 4.2.2

2022-06-02 Thread Martin Maechler
> Ashim Kapoor > on Wed, 1 Jun 2022 14:30:58 +0530 writes: > Dear Sir, >> > I upgraded to R 4.2.2 on Debian 10 today. >> >> Well, I assume you mean R 4.2.0 .. at least that one exists. > My bad, yes I made a typo. I did mean R 4.2.0. >> > The R shell incant

Re: [R] Error generated by nlme::gnls

2022-07-28 Thread Martin Maechler
t al. ! This is indeed a very old coding bug triggered by the more strict checks in R 4.2.x. I will indeed try Bill's proposal rather than remaining with deparse by using deparse1(). "Of course", this should hopefully be fixed in the next release of nlme. Martin Maechler ETH

Re: [R] Error in if (class(networks) == "matrix") from a function

2022-09-22 Thread Martin Maechler
> Eric Berger > on Wed, 21 Sep 2022 22:26:39 +0300 writes: > In R 4.2.0 there is a significant change. When you use an if() statement > with a condition of length > 1 this now reports an error. > e.g. this link mentions it as a change > https://www.jumpingrivers.com/bl

Re: [R] Unintended behaviour of stats::time not returning integers for the first cycle

2022-10-19 Thread Martin Maechler
I think the correction should only happen when the user asks for it, say by using a new argument 'roundYear = TRUE' (where the default remains roundYear=FALSE). Martin Maechler ETH Zurich and R Core tam > x <- ts(2:252, start = c(2002, 2), freq = 12) > d <- seq.D

Re: [R] Unintended behaviour of stats::time not returning integers for the first cycle

2022-10-19 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Wed, 19 Oct 2022 10:05:31 +0200 writes: >>>>> Andreï V Kostyrka >>>>> on Tue, 18 Oct 2022 16:26:28 +0400 writes: >> Sure, this works, and I was thinking about this solution, but it seem

Re: [R] unexpected 'else' in " else"

2022-10-21 Thread Martin Maechler
than ifelse(Cnd, A, B) whenever it is appropriate, i.e., the condition Cnd is a simple TRUE or FALSE. ifelse() is very much over-used! {For the more sophisticated reader: In R, these both are function calls: `if` is a function of 3 argument with a "peculiar" syntax and the third

Re: [R] Rare behaviour for nlme::reStruct example and question about ?lmeObject

2022-11-17 Thread Martin Maechler
> Andrew Simmons > on Tue, 15 Nov 2022 18:01:55 -0500 writes: > This seems to be a bug. I tried creating this function in the global > environment: > str.pdMat <- function (object, ...) > { > if (nlme::isInitialized(object)) { > NextMethod() > }

Re: [R] Rare behaviour for nlme::reStruct example and question about ?lmeObject

2022-11-17 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Thu, 17 Nov 2022 09:16:04 +0100 writes: >>>>> Andrew Simmons >>>>> on Tue, 15 Nov 2022 18:01:55 -0500 writes: >> This seems to be a bug. I tried creating this function in th

Re: [R] Rare behaviour for nlme::reStruct example and question about ?lmeObject

2022-11-18 Thread Martin Maechler
> Iago > on Thu, 17 Nov 2022 11:53:31 +0100 writes: > Thank you Martin, > Regarding my question about `terms`, I meant the `terms` component of > the `lme` output. For example, for > fm1 <- lme(distance ~ age, data = Orthodont) > I can see through str(fm1), the

Re: [R] confusion about dev.prev()

2022-12-06 Thread Martin Maechler
> Peter Langfelder > on Mon, 5 Dec 2022 21:40:13 +0800 writes: > Ah, thanks, got it. Misread the help again... ... I think we all had ... and then known for a while and then forgot again ... If you see how to improve the help page, so this happens less, .. we'd look at it to ad

Re: [R] if documentation

2022-12-07 Thread Martin Maechler
> PIKAL Petr > on Wed, 7 Dec 2022 07:04:38 + writes: > Hallo all Not sure if it is appropriate place but as I am > not involved in r-devel list I post here. > Documentation for Control (if, for, while, .) is missing > "if else" command. Although it can be find

Re: [R] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
> Jinsong Zhao > on Tue, 13 Dec 2022 17:07:00 +0800 writes: > I don > On 2022/12/13 10:13, Derek Ogle wrote: >> bgroup() from plotmath does not render properly for >> me. For example >> >> plot(0,xlim=c(0,1),ylim=c(0,1)) >> text(0.3,0.5,expression(bgroup

Re: [R] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Tue, 13 Dec 2022 11:02:23 +0100 writes: >>>>> Jinsong Zhao >>>>> on Tue, 13 Dec 2022 17:07:00 +0800 writes: >> I don Jinsong started on top and I did not see his continuation at th

Re: [R] Integer division

2022-12-19 Thread Martin Maechler
> Göran Broström > on Mon, 19 Dec 2022 14:22:00 +0100 writes: > I have a long vector x with five-digit codes where the > first digit of each is of special interest, so I extracted > them through >> y <- x %/% 1 > but to my surprise y contained the value -1 in

Re: [R] Integer division

2022-12-19 Thread Martin Maechler
uses the "floored" version, as recommended by Donald Knuth and as documented on the above Wikipedia page. Martin > On December 19, 2022 7:15:01 AM PST, "Göran Broström" > wrote: >> >> >> Den 2022-12-19 kl. 15:41, skrev Martin Maec

<    1   2   3   4   5   6   7   8   9   >