Re: [R] I have Problem using the Pipe Command

2024-06-19 Thread Martin Maechler
e 2024 you (Ogbos) should not run "productively" an R version that is older than May 2021 (where R 4.1.0 was released) : $ R-4.1.0 --version | head 1 R version 4.1.0 (2021-05-18) -- "Camp Pontanezen" $ R-4.1.0 --vanilla -s -e '1:10|>sum()' [1] 55 $ So upgrading your

[R] Altrep and translations (was " Description of error is untranslated when ....")

2024-05-14 Thread Martin Maechler
R-core *and* at first just in a separate branch before being merged in to the main (r-devel) branch. OTOH: There may be good reasons for translations lookup being brittle in case of altrep error messages .. and hence left off purposely? Martin -- Martin Maechler ETH Zurich and R Core Team _

Re: [R] Get a copy of a matrix only for TRUE entries of a matching size boolean matrix?

2024-05-06 Thread Martin Maechler
re efficient, although often requiring a bit more thought than ifelse() [so, if overall efficience is almost entirely your own human time, then using ifelse() may still be a good idea... ] Martin > On Fri, May 3, 2024 at 10:30 AM Marc Girondot wrote: >> Is it what you want ?

Re: [R] error when trying to install {rgdal} on Windows

2024-04-30 Thread Martin Maechler
ote that we *DO NOT WANT* screen shot images, but rather simple cut'n'paste plain text in this mailing list. Best regards, Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] x[0]: Can '0' be made an allowed index in R?

2024-04-23 Thread Martin Maechler
>>>>> Ben Bolker >>>>> on Sun, 21 Apr 2024 10:23:50 -0400 writes: > Also https://cran.r-project.org/package=Oarray (which is older and > hence possibly more stable) also maintained and written by a careful and really good person. I do recomme

Re: [R] Building Packages.

2024-03-21 Thread Martin Maechler
ee that install.packages is not the one from R. --- Concluding from your, Ben's, finding I'd guess that Posit finally decided to move away from this very unfriendly idea of sneakily replacing a base R function ? That would actually give raise to some applause.. Martin > On 2024-03-20

Re: [R] Building Packages.

2024-03-21 Thread Martin Maechler
ed, makes it harder to see what's going on (but also has less severe consequences; if they kept to the otherwise universal *rule* that the namespace and package must have the same objects apart from those only in the namespace, people would not even have access to R's true install.packages() but o

Re: [ESS] Error installing on Mac

2024-03-08 Thread Martin Maechler via ESS-help
> Liz Hare via ESS-help > on Thu, 7 Mar 2024 09:49:12 -0500 writes: > Liz Hare via ESS-help > on Thu, 7 Mar 2024 09:49:12 -0500 writes: > Hi all, > I'm updating ESS by installing from source. I uncommented the MacOS related lines from makeconfig, but I get this

Re: [R] converting MATLAB -> R | element-wise operation

2024-03-01 Thread Martin Maechler
across > in statistical computing. For the rare occasion when this > is not true the sweep() command is provided, typically > remembered once one was bitten by the lack of distinction > between row and column vectors. :) > Cheers, > Berwin Martin _

Re: [R] Packages sometimes don't update, but no error or warning is thrown

2024-02-14 Thread Martin Maechler
no update will happen. > Best wishes, > Berwin Yes, thank's a lot, Berwin. Indeed I've raised the fact that RStudio hides R's own install.packages() from the user and uses its own, undocumented one ... this has been the case for quite a few years. I found out during teaching

Re: [R] Help

2024-02-04 Thread Martin Møller Skarbiniks Pedersen
3, to=3, main="Normal Distribution") text(0, 0.1, latex2exp::TeX("$R^2 = 0.62$")) Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do rea

Re: [R] List of Words in BioWordVec

2024-02-03 Thread Martin Møller Skarbiniks Pedersen
On Fri, Feb 2, 2024, 01:37 TJUN KIAT TEO wrote: > Is there a way to extract list of words in BioWordVec in R > library(text) word_vectors <- textEmbed(texts = NULL, model = 'bioWordVecModel', model_type = 'wordvectors') word_list <- rownames(word_vectors$wordvectors) [[alternative

Re: [R] linear programming in R | limits to what it can do, or my mistake?

2024-01-30 Thread Martin Becker
),diag(4)), c(0,0,0,0,0,1,0,0), c(0,0,0,0,0,0,1,0), c(0,0,0,0,0,0,0,1) ) RHS <- c(640,825,580,925,0,0,0,0,1000,1000,1000) DIR <- c(rep("==",4),rep(">=",3),"=",rep("<=",3)) OBJ <- c(35,55,50,65,0,0,0,0) lp("min",OBJ,LHS,DIR,RHS) Best, Martin

Re: [R] Use of geometric mean .. in good data analysis

2024-01-22 Thread Martin Maechler
ot;best thing" to do for such positive right-skewed data in the same sense that the log-transform is the best "a priori" transformation for such data -- with the one advantage even that you need to fiddle with zeroes when log-transforming, whereas the geometric mean works already fo

Re: [ESS] Following up, success! [was RE: [R-win] Difficulty installing R packages under Windows 11 / Cygwin]

2024-01-05 Thread Martin Maechler via ESS-help
nywhere *unless* our emacs & ESS run on an Windows Cygwin platform? Martin __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help

Re: [R] Sorting based a custom sorting function

2023-12-14 Thread Martin Morgan
e a class (e.g., that requires vectors person and value) and implement a corresponding `xtfrm()` method. Have fun with the remainder of the advent! Another Martin From: R-help on behalf of Martin Møller Skarbiniks Pedersen Date: Thursday, December 14, 2023 at 6:42 AM To: R mailing list Subject: Re:

[R] Suggestion for list - change reply-to

2023-12-14 Thread Martin Møller Skarbiniks Pedersen
also. Any reason to keep it to the original sender? Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Sorting based a custom sorting function

2023-12-14 Thread Martin Møller Skarbiniks Pedersen
persons <- c("alfa", "bravo", "charlie", "delta", "echo", "foxtrot", "golf", "hotel", "india", "juliett", "kilo", "lima", "mike&

Re: [R] Sorting based a custom sorting function

2023-12-14 Thread Martin Møller Skarbiniks Pedersen
t;= 1) { return(arr) } else { pivot <- arr[1] less <- arr[-1][compare_func(arr[-1], pivot) <= 0] greater <- arr[-1][compare_func(arr[-1], pivot) > 0] return(c(quicksort(less, compare_func), pivot, quicksort(greater, compare_func))) } } Regards Martin

[R] Sorting based a custom sorting function

2023-12-14 Thread Martin Møller Skarbiniks Pedersen
Bob Medium # 2 Alice Small # 3 Charlie Large In this simple case I can just use an ordered factor but what about the poker hands situation? Regards Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/

Re: [R] Convert character date time to R date-time variable.

2023-12-08 Thread Martin Maechler
> Ebert,Timothy Aaron > on Thu, 7 Dec 2023 16:29:09 + writes: > Look at the lubridate package in R. Regards, Tim Absolutely *un*needed here !! - as others mention in this thread. Very simple with base R: > strptime("2020-09-17_00:00:00", format = "%Y-%m-%d_%H:%M:%S")

Re: [ESS] [External] [R-win] Difficulty installing R packages under Windows 11 / Cygwin

2023-12-02 Thread Martin Maechler via ESS-help
rent R versions all installed in our (Terminal Server) Windows version. Martin On Sat, Dec 2, 2023 at 9:42 PM Richard M. Heiberger via ESS-help wrote: > > my initial reaction is that you are trying to hard. I haven't paid serious > attention to Windows since > I switched to Mac ab

Re: [ESS] How can one tell rlang not to mess up R session in ESS ?

2023-11-14 Thread Martin Maechler via ESS-help
> color error backtraces? At least under the theme I use ("nord", for Emacs) > it basically nixes readability by leaving a 'dark on dark' default. I've noticed the same ... and was very frustrated. IIRC, I needed to restart R to get back to a usable *R* buffer. Martin

Re: [R] Calling Emacs Lisp Code/Function from R

2023-11-10 Thread Martin Gregory via R-help
Hi, if you run a server in your Emacs session you can use emacsclient to send a lisp call to the server. There's an example here: https://emacs.stackexchange.com/questions/54156/how-can-i-query-emacs-from-a-separate-process/54161#54161 Regards, Martin Gregory On 11/10/23 11:18, Duncan

Re: [R] Dependency errors for package pracma

2023-11-09 Thread Martin Maechler
neously runs other package installations and checks. I think you were slightly unlucky in the timing of your package checks/submission. Best regards, Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailm

Re: [R] Concordance and Kendall's tau in copula

2023-11-07 Thread Martin Maechler
) [1] -7 or look up the formulas for tau() or its inverse 'iTau': > copClayton@tau function (theta) { theta/(theta + 2) } > copClayton@iTau function (tau) { 2 * tau/(1 - tau) } > Best regards, Martin {and yes, consider getting our 'useR! Springer s

Re: [R] strptime with +03:00 zone designator

2023-11-06 Thread Martin Maechler
t it to R's bugzilla? It's the first time I hear of this "Feature" of the ISO standard, but then I'm not at all a timezone, and even less an ISO standard expert. Best, Martin >> On Mon, 6 Nov 2023 at 13:18, jim holtman >> wrote: >> >>> try u

Re: [R] Dynamically create a (convenience) function in a package

2023-10-30 Thread Martin Maechler
anuary 2007) R> fortunes::fortune(106) If the answer is parse() you should usually rethink the question. -- Thomas Lumley R-help (February 2005) R> Best, Martin > On Mon, Oct 30, 2023, 06:28 Sigbert Klinke > wrote: >> Hi, >> &g

Re: [R] The argument 'eps.Pvalue' of `printCoefmat()`

2023-10-30 Thread Martin Maechler
e *did* try some changes, but IIRC they all had their flaws and hence were not good enough to warrant a change of code. So, for now, we should at least change that part of the help page -- finally! Martin __ R-help@r-project.org mailing list -

Re: [R] running crossvalidation many times MSE for Lasso regression

2023-10-23 Thread Martin Maechler
> Jin Li > on Mon, 23 Oct 2023 15:42:14 +1100 writes: > If you are interested in other validation methods (e.g., LOO or n-fold) > with more predictive accuracy measures, the function, glmnetcv, in the spm2 > package can be directly used, and some reproducible examples

Re: [R] stopping R emails

2023-10-19 Thread Martin Maechler
copied there before you manage > to unsubscribe. > With condolences, > John Nash >From me, as well. Jim Lemon has been one of the frequent really *friendly* and patient "helpers" to many who have searched for support and help on the R mailing lists (R-help and R-

Re: [R] Confirming MySQL Alive

2023-10-08 Thread Martin Møller Skarbiniks Pedersen
You don't need sudo to run: systemctl status On Sat, Oct 7, 2023, 17:09 Stephen H. Dawson, DSL via R-help < r-help@r-project.org> wrote: > Hi, > > > Getting some data from an older MySQL box. I had an event recently where > the MySQL box went off-line for maintenance without a prior announcement

Re: [R] save() and load(): *prefer* saveRDS() and readRDS()

2023-09-26 Thread Martin Maechler
> Jeff Newmiller via R-help > on Mon, 25 Sep 2023 18:46:02 -0700 writes: > You never created any object in R called irisdataTest. Objects in the global environment have names that are unrelated to the names of files on disk. > The load function modifies an environment to

Re: [R] Help with plotting and date-times for climate data

2023-09-15 Thread Martin Møller Skarbiniks Pedersen
Change geom_point(aes(y = tmax_mean, color = "blue")) to geom_point(aes(y = tmax_mean), color = "blue") if you want blue points. aes(color = ) does not set the color of the points. aes(color = ) takes a column (best if it is a factor) and uses that for different colors.

Re: [R] Regarding error in RStudio

2023-09-06 Thread Martin Maechler
udio, you definitely need to get help from the RStudio community. Hoping that helps some steps further. Best regards, Martin -- Martin Maechler ETH Zurich and R Core team __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.et

Re: [R] Time out error while connecting to Github repository

2023-09-04 Thread Martin Maechler
> siddharth sahasrabudhe via R-help > on Sun, 3 Sep 2023 09:54:28 +0530 writes: > I want to access the .csv file from my github > repository. While connecting to the Github repository I am > getting the following error: > Error in curl::curl_fetch_memory(file) :

Re: [R] [Pkg-Collaboratos] BioShapes Almost-Package

2023-09-04 Thread Martin Maechler
g, or you'll lose > all your edits. But this is a good way to get started. > I think for the first few times the comments are really > helpful, but I wouldn't mind a way to suppress them. > Duncan Murdoch Me neither. A new option, not changing the default, would make sense.

Re: [R] [Pkg-Collaboratos] BioShapes Almost-Package

2023-09-04 Thread Martin Maechler
use it only rarely; e.g., together with ESS (Emacs Speaks Statistics) to make the initial creation or sometime a thorough updating the help pages man/*.Rd more convenient). There are different tastes and different work flows for different people. Martin > On September 3, 202

Re: [R] Book Recommendation

2023-08-28 Thread Martin Møller Skarbiniks Pedersen
The SQLite is a good database to use. https://cran.r-project.org/web/packages/RSQLite/vignettes/RSQLite.html On Mon, Aug 28, 2023, 22:12 Stephen H. Dawson, DSL via R-help < r-help@r-project.org> wrote: > > This is an academic course. The effort now is to nail down the former. I > am pushing

Re: [R] MASS::mvrnorm() on MKL may produce different numbers even when the seed is the same?

2023-08-18 Thread Martin Maechler
deratum for all scientists and I hope also for all data "wranglers" etc.. Martin -- Martin Maechler ETH Zurich and R Core team > On Wed, Aug 16, 2023 at 8:11 PM Shu Fai Cheung > wrote: >> Hi All, >> >> When addressing an error in one of

Re: [ESS] ESS code-folding?

2023-08-17 Thread Martin Maechler via ESS-help
> Statistical Programmer > BUMC, Dept of Rheumatology > she/her Great --- note that this has been part of Emacs (independently of ESS) for"ever" (~ 30 years I guess). Martin > From: Karlo Guidoni Martins > Sent: Thursday, August 17, 2023 7:29 AM

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-17 Thread Martin Maechler
>>>>> Leonard Mada >>>>> on Wed, 16 Aug 2023 20:50:52 +0300 writes: > Dear Iris, > Dear Martin, > Thank you very much for your replies. I add a few comments. > 1.) Correct formula > The formula in the Subject Title was corre

Re: [ESS] New Emacs Modified distributions - now double the pleasure!

2023-08-16 Thread Martin Maechler via ESS-help
rs community ! I will be happy to make use of it myself for the Windows version (on a Windows terminal server) when I do test R things on Windows. > I hope an editor of the ESS web page will read this; could you please update the links on the Download page? I did ( ~ 4 hours ago ). Best

Re: [R] Numerical stability of: 1/(1 - cos(x)) - 2/x^2

2023-08-16 Thread Martin Maechler
lysis 101" and is called "cancellation": Direct evaluation of 1 - cos(x) for small 'x' *cannot* ever be numerically accurate and suffers from cancellation. log(1+x) for small x is slightly more subtle than pure cancellation, but exactly the same reason we introduced log1p

Re: [R] Style guide when using "R" in a title

2023-07-27 Thread Martin Maechler
ot;. Using the letter 'R' as are regular word (noun) in a title is perfectly fine. Martin > On Wed, Jul 26, 2023 at 4:01 PM Wadsworth, Spencer G > [STAT] wrote: >> >> Hello, >> >> I am working on a small booklet to be used with an &

Re: [R] change language at console

2023-07-19 Thread Martin Maechler
s" ru "несовместимые размерности" tr "uyumsuz boyutlar" zh_CN "维度不相配" zh_TW "維度不符合" > (nTrans <- length(unique(txts))) [1] 12 > (not_translated <- names(txt

Re: [R] Variable and value labels

2023-07-12 Thread Martin Maechler
> Anupam Tyagi > on Wed, 12 Jul 2023 09:18:55 +0530 writes: > Hello, > is there an easy way to do variable and value labels (for > factor variables) in base-R, without using a package. Yes, there are many. How many help pages (in R , i.e. base-R) did you consult?

Re: [R] printCoefmat() and zap.ind

2023-07-07 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Fri, 7 Jul 2023 18:12:24 +0200 writes: >>>>> Shu Fai Cheung >>>>> on Thu, 6 Jul 2023 17:14:27 +0800 writes: >> Hi All, >> I would like to ask two questions about prin

Re: [R] printCoefmat() and zap.ind

2023-07-07 Thread Martin Maechler
gt; ``` > However, this solution is not ideal because the numbers > of decimal places of "Estimate" and "Std. Error" are > different. How can I get the output like this one? > ```r > #> Estimate Std. Error t value Pr(>|t|) &g

Re: [ESS] ESS "taking over" {[Rd] New behavior when running script in package directory?}

2023-06-22 Thread Martin Maechler via ESS-help
longer to R-devel (to which I'll post a pointer to this message on ESS-help). Martin > On 2023-06-21 6:00 am, r-devel-requ...@r-project.org wrote: >> When I run a script foo.R containing some trivial code in my home >> directory, via Emacs/ESS, everything works as expec

Re: [R] warnng to an error....

2023-06-19 Thread Martin Maechler
if(... class(x) == "" ..) is almost always (*) bad code. Everyone should learn about inherits() and why sane R code should use that instead. --- *) It may be ok, e.g., when `x` was very expliclitly constructed in the same part of code a bit earlier Martin > THanking y

Re: [R] error in arfima...

2023-06-09 Thread Martin Maechler
>>>>> akshay kulkarni >>>>> on Mon, 5 Jun 2023 14:11:12 +0000 writes: > Dear Martin, > Sad that the bug is beyond your ken... well, that's not exactly what I tried to say (and I did ask you for more output from your R session and also asked

Re: [R] error in arfima...

2023-06-05 Thread Martin Maechler
> Dear Martin, > REgrets to reply this late > I am staring at a conundrum never before encountered in my experience with R: > LYGH[[201]] > [1] 45.40 3.25 6.50 2.15 > > arfima(LYGH[[201]]) > Error in .fdcov(x, fdf$d, h, nar = nar, nma = nm

Re: [R] error in arfima...

2023-06-01 Thread Martin Maechler
ords arfima() calls fracdiff::fracdiff() and the error happens there --- for you, but not for me, if I try to use the same data as you. I see that you must have found that too, because you mentioned View(environment(fracdiff)$.fdcov) Maybe you need to update.packages()

[R] Asking about R "Security" ..

2023-05-17 Thread Martin Maechler
answered less frequently by volunteers as you, Ivan, for whom we are really very grateful. Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http:

Re: [R] Regex Split?

2023-05-05 Thread Martin Maechler
ot;o" "; " "t" "h" "r" "e" "e" "!" >> gsub(pattern="[[:<:]]", "#", "One, two; three!", perl=TRUE) > [1] "#One, #two; #three!" [...] [...] Maybe this should be continued either

[R-es] Help

2023-04-10 Thread JOSE MARTIN AREVALO
Hola a todos! Espero que me pod�is ayudar porque estoy un poco atascado. He hecho un modelo de regresi�n de Cox para la supervivencia a 3 a�os de pacientes con c�ncer colorrectal en funci�n de una serie de factores. De la muestra total de unos 1000 casos, cre� dos grupos: uno de entrenamiento y

[R-es] Calibrar y validar nomograma

2023-04-10 Thread JOSE MARTIN AREVALO
Hola a todos! Espero que me pod�is ayudar porque estoy un poco atascado. He hecho un modelo de regresi�n de Cox para la supervivencia a 3 a�os de pacientes con c�ncer colorrectal en funci�n de una serie de factores. De la muestra total de unos 1000 casos, cre� dos grupos: uno de entrenamiento y

Re: [R] R does not run under latest RStudio

2023-04-06 Thread Martin Morgan
employee. Martin Morgan From: R-help on behalf of Steven Yen Date: Thursday, April 6, 2023 at 3:20 PM To: Uwe Ligges Cc: R-help Mailing List , Steven T. Yen Subject: Re: [R] R does not run under latest RStudio The RStudio list generally does not respond to free version users. I was hoping

Re: [R] "prob" package alternative

2023-04-06 Thread Martin Maechler
s" (for Windows): ---> https://cran.r-project.org/bin/windows/Rtools/ With best regards, Martin __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] lines through points in lattice legend

2023-01-29 Thread martin gregory via R-help
finitely not simpler. Given that your choice of points is so distinctive, why not just use the points in the legend? Regards, Martin > On 28. Jan 2023, at 10:18, Kenneth Knoblauch wrote: > > Hi, > > I'm struggling to find if there is a simple way to make the lines and points >

Re: [R] Flickering when scrolling in R graphics windows

2023-01-24 Thread Martin Maechler
> Ziyun Tang > on Sat, 21 Jan 2023 15:14:15 -0500 writes: > Hello, I have been experiencing some issues regarding scrolling with > the mouse or trackpad in R graphics windows (from the base graphics > package), which sometimes results in flickering, and wanted to see if

Re: [R] Printing special characters

2023-01-16 Thread Martin Maechler
at help(pdf) contains See Also: pdfFonts, pdf.options, embedFonts, Devices, postscript. cairo_pdf and (on macOS only) quartz for other devices that can produce PDF. More details of font families and encodings and especially handling text in a non-Lat

Re: [R] Integer division

2022-12-21 Thread Martin Maechler
> On Tue, 20 Dec 2022 at 19:53, Göran Broström > wrote: >> Thanks Richard, >> >> the "rounding claim" was my mistake (as I replied to >> Martin), I should said "truncates toward zero" as you >> explain. &g

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 Maechler:

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

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] bgroup not rendering properly

2022-12-13 Thread Martin Maechler
f") expression(bgroup('(',atop(x,y),')') dev.off() the resulting PNG or PDF will look fine, even on Windows in R 4.2.2. Martin >> >> and >> >> library(ggplot2) ggplot(mtcars, aes(wt, mpg)) + >> annotate("text", x=2.5, y=25,

Re: [R] How to access source code

2022-12-08 Thread Martin Morgan
showMethods(LGD, includeDef = TRUE) shows the implementation of all methods on the LGD generic, and can be a useful fast track to getting an overview of what is going on. Martin Morgan From: R-help on behalf of Ivan Krylov Date: Thursday, December 8, 2022 at 11:23 AM To: Christofer Bogaso

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

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

2022-12-06 Thread Martin Maechler
o this happens less, .. we'd look at it to add the improvement there. Martin > Peter > On Mon, Dec 5, 2022 at 9:38 PM Ivan Krylov wrote: >> >> В Mon, 5 Dec 2022 21:28:16 +0800 >> Peter Langfelder пишет: >> >> > Open two devices, plot a

Re: [R] interval between specific characters in a string...

2022-12-02 Thread Martin Morgan
You could split the string into letters and figure out which ones are �b� which(strsplit(x, "")[[1]] == "b") and then find the difference between each position, �anchoring� at position 0 > diff(c(0, which(strsplit(x, "")[[1]] == "b"))) [1] 2 4 1 6 4 From: R-help on behalf of Evan Cooch

Re: [ESS] A discrepancy between elpa version and ubuntu/mint version

2022-11-20 Thread Martin Maechler via ESS-help
> Thanks Rodney for your advice. > > ______ > ESS-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/ess-help -- Martinhttp://stat.ethz.ch/~maechler Seminar für Statistik, ETH Zürich HG G 16 Rämistrasse 101 CH-809

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

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-17 Thread Martin Maechler
ts ‘X’ and ‘terms’ specifying the denominator degrees of freedom for, respectively, t-tests for the individual fixed effects and F-tests for the fixed-effects terms in the models. and I don't think that there needs to be more explanation. (??) Martin ___

Re: [ESS] Tab completion for CamelCase

2022-11-08 Thread Martin Maechler via ESS-help
CamelCase. Which Version of ESS (and Emacs) are you talking about? (M-x emacs-version / M-x ess-version) Martin > Can tab completion on Windows give proper CamelCase variables? > Thanks, > Naresh __ ESS-help@r-project.org mailing

Re: [R] Partition vector of strings into lines of preferred width

2022-10-28 Thread Martin Morgan
> strwrap(text) [1] "What is the best way to split/cut a vector of strings into lines of" [2] "preferred width? I have come up with a simple solution, albeit naive," [3] "as it involves many arithmetic divisions. I have an alternative idea" [4] "which avoids this problem. But I may miss some

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] 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

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

2022-10-19 Thread Martin Maechler
hould 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.Date(as.Date("2002-02-01")

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

2022-09-22 Thread Martin Maechler
., I'd try to see if the fast is.matrix(.) applies to your 'networks' (and I'm guessing "yes" with high confidence ..). Martin > HTH, > Eric > On Wed, Sep 21, 2022 at 10:21 PM Chao Liu wrote: >> Dear R-Help community, >> >>

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

2022-07-28 Thread Martin Maechler
Ben et 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 Zuric

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

2022-06-02 Thread Martin Maechler
mainly because of lazyness as our IT staff helps me solve all problems with Fedora quickly, including lowelevel device-related ones, I think that Debian(+derivatives) has always been the exception among the Linux distros and for all the others, '--vanilla' really meant "vanilla" in a loose se

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

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

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] [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

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

2022-01-25 Thread Martin Maechler
ui 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 measuring carefully

[R] [R-pkgs] Analysis of phylogenetic datasets in R: package "TreeSearch"

2022-01-18 Thread Martin R. Smith
preprint: https://www.biorxiv.org/content/10.1101/2021.11.08.467735 Regards, Martin -- *Dr. Martin R. Smith* Associate Professor in Palaeontology Durham University Department of Earth Sciences Mountjoy Site, South Road, Durham, DH1 3LE United Kingdom *M*: +44 (0)774 353 7510 *E*: martin.sm

[R] [R-pkgs] Package "Rogue": Detect wildcard taxa in sets of phylogenetic trees

2022-01-15 Thread Martin R. Smith
can be found at https://cran.r-project.org/web/packages/Rogue/vignettes/Bayesian.html. Questions and bug reports are welcome at https://github.com/ms609/Rogue. Regards, Martin Smith -- *Dr. Martin R. Smith* Associate Professor in Palaeontology Durham University Department of Earth Sciences Mountjoy

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

2022-01-14 Thread Martin Maechler
-- 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. Best, Martin -- Martin Mae

[R] [R-pkgs] Fwd: Ternary 2.0: Holdridge life zones and ternary plots

2022-01-11 Thread Martin R. Smith
ps://ms609.github.io/Ternary/articles/Holdridge.html gives an example and pointers to detailed documentation. Ternary 2.0 also includes a complete 'shiny' graphical user interface to allow interactive construction of ternary plots without detailed knowledge of R. Regards, Martin Smith -- *Dr

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] Bug in list.files(full.names=T)

2021-12-20 Thread Martin Maechler
al server (2016) and now, as I just checked, it also *still* has the same Windows-specific behavior in R-devel-ucrt (the one from Tomas Kalibera) : If I use a trailing `/` or `\\` it is *kept*, but no additional fsep (i.e. '/' or `\\`) is added (on Windows) when I use list.files(dir, full.names=TRUE)

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 psych

[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

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

2021-12-20 Thread Martin Maechler
gt; 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... Best, Martin Maechler

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

2021-12-09 Thread Martin Maechler
-.data.frame` {or for S4 methods, the 'Matrix' or 'Rmpfr' packages} should show you a lot. What you should take from there: Do work with *both* missing(drop) and nargs() (and more) in order to distinguish m[i] from m[i,] etc Best, Martin > Got some progress on this, but s

Re: [R] Handling dependencies on Bioconductor packages for packages on CRAN

2021-12-07 Thread Martin Morgan
age installation would be 'non-standard' (didn't I just install gRbase??), so this is not an ideal solution. Martin On 12/4/21, 10:55 AM, "R-help on behalf of Søren Højsgaard" wrote: Dear all My gRbase package imports the packages from Bioconductor: graph, RBGL and Rgraphv

  1   2   3   4   5   6   7   8   9   10   >