Re: [Rd] Format printing inside a matrix

2019-07-15 Thread Martin Maechler
> Pages, Herve > on Mon, 8 Jul 2019 04:32:29 + writes: > On 7/7/19 17:41, Jialin Ma wrote: >> Hi Abby, >> >> Thanks a lot for your paraphrasing and your suggestion! >> >> The problem of wrapping the list into a S3/S4 object, i.e. subclassing array >>

Re: [Rd] Addition of a meta viewport tag to HTML manuals

2019-07-15 Thread Martin Maechler
> Bob Rudis > on Tue, 9 Jul 2019 14:24:24 -0400 writes: > The addition of a single line: > > at in the of the R HTML generated manuals would make them much easier to read on mobile devices. > texi2any (which generates the HTML files) is based on long-working Perl

[Rd] Convert STRSXP or INTSXP to factor

2019-07-15 Thread Morgan Morgan
Hi, Using the R C PAI, is there a way to convert to convert STRSXP or INTSXP to factor. The idea would be to do in C something similar to the "factor" function (example below): > letters[1:5] # [1] "a" "b" "c" "d" "e" > factor(letters[1:5]) # [1] a b c d e # Levels: a b c d e There is the func

[Rd] Unexpected behaviour when comparing (==) long quoted expressions

2019-07-15 Thread Daniel Chen
Hi everyone: I’m one of the interns at RStudio this summer working on a project that helps teachers grade student code. I found an unexpected behaviour with the |==| operator when comparing |quote|d expressions. Example 1: |u <- quote(tidyr::gather(key = key, value = value, new_sp_m014:newrel

[Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Ghiggi Gionata
Hi all ! I noticed a strange behaviour of the function `class<-` when a class-specific '[[.' method is defined. Here below a reproducible example : #---. counttt <- 0 `[[.MYCLASS` = function(x, ...) { counttt <<- counttt + 1

Re: [Rd] MacOS parallel::makeCluster fails

2019-07-15 Thread Dominik Leutnant
Hi Thomas, thanks for your reply (and thanks for your patience...). I am now using the following minimal reprex: > library(parallel) > cl <- makeCluster(2L) I freshly started the machine and did not open any other app. Just R.app (3.6.1). After executing the second line of code, R seems to ha

[Rd] Potential bug with data.frame replacement

2019-07-15 Thread Benjamin Jean-Marie Tremblay
Dear R-devel, I have encountered a crash-inducing scenario and would like to enquire as to whether this would be considered a bug. To reproduce the crash: X <- sample(letters, 3000, TRUE) D <- data.frame(X, 1:3000, X, X, X, X, X) D$X1.3000 <- paste0("GSM", D) The reason why I'm not sure if this

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Michael Lawrence via R-devel
I'm unable to reproduce this with R 3.6.1. Which version are you using? Is this a fresh session? On Mon, Jul 15, 2019 at 3:25 AM Ghiggi Gionata wrote: > > Hi all ! > > I noticed a strange behaviour of the function `class<-` when a class-specific > '[[.' method is defined. > > Here below a reprod

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Duncan Murdoch
On 07/07/2019 11:49 a.m., Ghiggi Gionata wrote: Hi all ! I noticed a strange behaviour of the function `class<-` when a class-specific '[[.' method is defined. Here below a reproducible example : #---. counttt <- 0 `[[.MYCLASS

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Rui Barradas
Hello, Clean R 3.6.1 session on Ubuntu 19.04, RStudio 1.1.453. sessionInfo() at the end. I can reproduce this. counttt <- 0 `[[.MYCLASS` = function(x, ...) { counttt <<- counttt + 1 # browser() x = NextMethod() return(x) } df <- as.data.frame(matrix(1:20, nrow=5)) class(df) <- c("MY

Re: [Rd] [External] Re: Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Tierney, Luke
Pasting the entire example into RStudio and hitting return to evaluate does not show this. Evaluating the finall line to print counttt separately does. Looks like RStudio is calling `[[` on your object when examining the environment for the Environment panel. If this concerns you then you should c

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Duncan Murdoch
On 15/07/2019 8:57 a.m., Rui Barradas wrote: Hello, Clean R 3.6.1 session on Ubuntu 19.04, RStudio 1.1.453. sessionInfo() at the end. That's not what I'd call a "clean session" with all those packages loaded: loaded via a namespace (and not attached): [1] sos_2.0-0 nlme_3.1-140

Re: [Rd] [External] Re: Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Duncan Murdoch
On 15/07/2019 9:24 a.m., Tierney, Luke wrote: Pasting the entire example into RStudio and hitting return to evaluate does not show this. Evaluating the finall line to print counttt separately does. Looks like RStudio is calling `[[` on your object when examining the environment for the Environme

Re: [Rd] [External] Mitigating Stalls Caused by Call Deparse on Error

2019-07-15 Thread Tierney, Luke
Better to add this to the wishlist item. This all needs to be looked at together, and nothing is likely to happen until after vacation/conference season. It will disappear from everyone's radar if it is just in R_devel. Best, luke On Sun, 14 Jul 2019, brodie gaslam wrote: > Luke, thanks for co

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Rui Barradas
Hello, Inline. Às 14:26 de 15/07/19, Duncan Murdoch escreveu: On 15/07/2019 8:57 a.m., Rui Barradas wrote: Hello, Clean R 3.6.1 session on Ubuntu 19.04, RStudio 1.1.453. sessionInfo() at the end. That's not what I'd call a "clean session" with all those packages loaded: You are right, but

Re: [Rd] strange increase in the reference number

2019-07-15 Thread King Jiefei
Hi Duncan, Gabriel, and Brodie Thanks for the explanations and references. Brodie's blog talks about exactly the same problem without involving too many technical details. I would recommend to read it if anyone is interested in it. I really appreciate all of you guys' answers. Best, Jiefei On S

Re: [Rd] R-Forge > GitHub?

2019-07-15 Thread Dirk Eddelbuettel
On 14 July 2019 at 13:08, Spencer Graves wrote: | for that.  I lost the history in doing so, but I can live without that | history. Well many of us imported svn repos into git repos. And my favourite example is still ESS as it has history back to 1997 (!!) thanks to cvs2svn pre-filling its svn

Re: [Rd] Possible bug in `class<-` when a class-specific '[[.' method is defined

2019-07-15 Thread Kevin Ushey
When RStudio builds the Environment pane, it will evaluate some R code on objects in your global environment (as you have seen). In particular, for better or worse, it calls `str()` on objects in the global environment, to get a short text summary of the object. So, to reproduce what you're seeing

[Rd] GitHub passwords in .git/config?

2019-07-15 Thread Spencer Graves
On 2019-07-15 10:56, Dirk Eddelbuettel wrote: Don't write passwords down like this. Your error is likely in expecting _ssh_ authentication over _https_ -- when it works only over ssh. Use the alternate form for a remote e.g. one that looks like g...@github.com:emacs-ess/ESS.git   I'm

Re: [Rd] GitHub passwords in .git/config?

2019-07-15 Thread Dirk Eddelbuettel
On 15 July 2019 at 11:41, Spencer Graves wrote: | On 2019-07-15 10:56, Dirk Eddelbuettel wrote: | > | > Don't write passwords down like this. Your error is likely in expecting _ssh_ | > authentication over _https_ -- when it works only over ssh. Use the alternate | > form for a remote e.g. one

Re: [Rd] Potential bug with data.frame replacement

2019-07-15 Thread William Dunlap via R-devel
This may be related to the size of the deparsed call in the error message that Brodie and Luke were discussing recently on R-devel (" Mitigating Stalls Caused by Call Deparse on Error"). I don't get a crash, but the error message itself doesn't show up after the deparsed call. > X <- sample(lett

Re: [Rd] GitHub passwords in .git/config?

2019-07-15 Thread Brian G. Peterson
it would be: ssh://g...@github.com:sbgraves237/Ecdat.git On Mon, 2019-07-15 at 11:41 -0500, Spencer Graves wrote: > > On 2019-07-15 10:56, Dirk Eddelbuettel wrote: > > > > > > > > Don't write passwords down like this. Your error is likely in > > expecting _ssh_ > > authentication over _https

Re: [Rd] Unexpected behaviour when comparing (==) long quoted expressions

2019-07-15 Thread Clark Fitzgerald
Hi Dan, I wouldn't expect that behavior out of `==` on language objects either. On a related note, working with R's language objects directly can be clumsy. That was one of the motivations for Nick Ulle to develop the rstatic package. https://github.com/nick-ulle/rstatic It lets me write code tha

Re: [Rd] Potential bug with data.frame replacement

2019-07-15 Thread Iñaki Ucar
On Mon, 15 Jul 2019 at 18:55, William Dunlap via R-devel wrote: > > This may be related to the size of the deparsed call in the error message > that Brodie and Luke were discussing recently on R-devel (" Mitigating > Stalls Caused by Call Deparse on Error"). I don't get a crash, but the > error

Re: [Rd] GitHub passwords in .git/config?

2019-07-15 Thread Spencer Graves
I'm diverging:  Now I get: >>> git pull ssh: Could not resolve hostname github.com:sbgraves237: nodename nor servname provided, or not known fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.   ** With .git/config

Re: [Rd] GitHub passwords in .git/config?

2019-07-15 Thread Marcel Ramos
Hi Spencer, The first line in the `[remote "origin"]` section should read: ``` url = g...@github.com:sbgraves237/Ecdat.git ``` Generally, I add these configs by doing a clone on the command line such as: > git clone > g...@github.com:sbgraves237

Re: [Rd] GitHub passwords in .git/config?

2019-07-15 Thread Spencer Graves
Thanks, Marcel:   That did it.   My next challenge is to replicate it on a Windows 10 machine.   Spencer On 2019-07-15 12:54, Marcel Ramos wrote: Hi Spencer, The first line in the `[remote "origin"]` section should read: ``` url = g...@github.com:sbgraves237/Ecdat.git

Re: [Rd] Convert STRSXP or INTSXP to factor

2019-07-15 Thread Gabriel Becker
Hi Morgan, So if the goal is output identical to calling factor, one thing youc an do is construct and evaluate a call to the R-level factor function. That would work and be guaranteed to meet your requirement. The factor function is implemented with R code, without even any direct calls d

Re: [Rd] [External] Potential bug with data.frame replacement

2019-07-15 Thread Tierney, Luke
Thanks for the report. The buffer overflow should be fixed in R-patched and R-devel. Best, luke On Sun, 14 Jul 2019, Benjamin Jean-Marie Tremblay wrote: > Dear R-devel, > > I have encountered a crash-inducing scenario and would like to enquire as to > whether this would be considered a bug. To