Re: [R-pkg-devel] EXTERNAL: CRAN packages dependency on bioconductor packages

2024-05-15 Thread Li, Junhui
Hi Marcel,

I appreciate your suggestion and clarification. It is worth mentioning that 
�rmarkdown� is included in the Import filed, and I apologize for not stating it 
here. Interestingly,  I was able to successfully upload StepReg version 1.5.0 
to CRAN with BiocStyle listed in the Suggests field. However, I encountered 
this issue this time around. I attempted to address it by adding an empty 
`biocViews:` field in the DESCRIPTION, but unfortunately, it did not resolve 
the problem. It seems that there are some issues with CRAN check.

Best,
Junhui
From: Ramos Perez, Marcel 
Date: Wednesday, May 15, 2024 at 17:50
To: Li, Junhui , r-package-devel@r-project.org 

Subject: Re: EXTERNAL: [R-pkg-devel] CRAN packages dependency on bioconductor 
packages
Hi Junhui,

There are about 25 packages in CRAN that use BiocStyle, including yours.
It seems that MetaIntegrator is also facing the same error. I have not
looked too deeply into the issue but it seems that you should also
include "rmarkdown" in the Suggests field.

AFAIK, there is no need to include an empty `biocViews:` field in the
DESCRIPTION. CRAN knows about Bioconductor repositories via
setRepositories().

Note. Users should use BiocManager to resolve Bioconductor dependencies
(rather than setRepositories).

Best regards,
Marcel


From: R-package-devel  on behalf of Li, 
Junhui 
Sent: Tuesday, May 14, 2024 3:51 PM
To: r-package-devel@r-project.org 
Subject: EXTERNAL: [R-pkg-devel] CRAN packages dependency on bioconductor 
packages

Hi everyone,

I recently developed an R package called 'StepReg' and used the Bioconductor R 
package 'BiocStyle' in my vignettes, as shown below:

output:
  BiocStyle::html_document:
toc_float: true
  BiocStyle::pdf_document: default

In my DESCRIPTION file, I added 'BiocStyle' to the Suggests field and included 
a new line 'biocViews:', as follows:

VignetteBuilder: knitr
biocViews:
Suggests:
knitr,
testthat,
BiocStyle,
kableExtra

You may find all those information here: 
https://github.com/JunhuiLi1017/StepReg/tree/dev

There were no error messages when checking with 'R CMD check' and on 
https://win-builder.r-project.org/upload.aspx. However, an error message 
occurred when I attempted to upload it to CRAN:

* checking re-building of vignette outputs ... ERROR
Error(s) in re-building vignettes:
--- re-building 'StepReg.Rmd' using rmarkdown
Error: processing vignette 'StepReg.Rmd' failed with diagnostics:
there is no package called 'BiocStyle'
--- failed re-building 'StepReg.Rmd'

SUMMARY: processing the following file failed:
   'StepReg.Rmd'

Error: Vignette re-building failed.
Execution halted

For version 1.5.0 (https://cran.r-project.org/web/packages/StepReg/index.html), 
I successfully uploaded it to CRAN without including 'biocViews:' in the 
DESCRIPTION file two months ago. However, I'm encountering difficulties this 
time. Any insights or suggestions on resolving this issue would be greatly 
appreciated.

Thanks,
Junhui

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

This email message may contain legally privileged and/or confidential 
information. If you are not the intended recipient(s), or the employee or agent 
responsible for the delivery of this message to the intended recipient(s), you 
are hereby notified that any disclosure, copying, distribution, or use of this 
email message is prohibited. If you have received this message in error, please 
notify the sender immediately by e-mail and delete this email message from your 
computer. Thank you.

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

2024-05-15 Thread Vladimir Dergachev




On Wed, 15 May 2024, David Cortes wrote:


I'm seeing some issues using R Altrep classes when compiling a package
with the MSVC compiler on windows.

While CRAN doesn't build windows binaries with this compiler, some
packages such as Arrow and LightGBM have had some success in building
their R packages with MSVC outside of CRAN, in order to enable
functionalities that MinGW doesn't support.


Out of curiousity - which functionalities are those ?

One suggestion would be isolate MSVC-specific code in a library and then 
build a package linking to that - this might turn out to be more portable.


thank you

Vladimir Dergachev

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] CRAN packages dependency on bioconductor packages

2024-05-15 Thread Li, Junhui
Hi Llu�s,

Thanks for your input. I believe it is ok to use a vignette output 
conditionally with knitr. However,  what confuses me is that I was able to 
successfully upload StepReg version 1.5.0 to CRAN with BiocStyle listed in the 
Suggests field. It seems that there is some issues with CRAN check.

Best,
Junhui
From: Llu�s Revilla 
Date: Tuesday, May 14, 2024 at 18:09
To: Li, Junhui 
Cc: r-package-devel@r-project.org 
Subject: Re: [R-pkg-devel] CRAN packages dependency on bioconductor packages
Hi Junhui,

There is a separate log for checking if your package works without suggested 
packages: in the StepReg results
The noSuggests title leads to: 
https://www.stats.ox.ac.uk/pub/bdr/noSuggests/StepReg.out
Where you can see that it fails if a user don't have BiocStyle installed.
I don't know if it is possible to use a vignette output conditionally with 
knitr: In any case it seems that it would be a requirement (Imports, or 
Depends).

However, it is best to not use the Bioconductor style for a package in CRAN.
You could use the *_vignette or *_document format directly (from rmarkdown if I 
recall correctly).
You will remove a dependency and avoid this problem entirely.

Best,

Llu�s


On Tue, 14 May 2024 at 22:48, Li, Junhui 
mailto:junhui.l...@umassmed.edu>> wrote:
Hi everyone,

I recently developed an R package called 'StepReg' and used the Bioconductor R 
package 'BiocStyle' in my vignettes, as shown below:

output:
  BiocStyle::html_document:
toc_float: true
  BiocStyle::pdf_document: default

In my DESCRIPTION file, I added 'BiocStyle' to the Suggests field and included 
a new line 'biocViews:', as follows:

VignetteBuilder: knitr
biocViews:
Suggests:
knitr,
testthat,
BiocStyle,
kableExtra

You may find all those information here: 
https://github.com/JunhuiLi1017/StepReg/tree/dev

There were no error messages when checking with 'R CMD check' and on 
https://win-builder.r-project.org/upload.aspx. However, an error message 
occurred when I attempted to upload it to CRAN:

* checking re-building of vignette outputs ... ERROR
Error(s) in re-building vignettes:
--- re-building 'StepReg.Rmd' using rmarkdown
Error: processing vignette 'StepReg.Rmd' failed with diagnostics:
there is no package called 'BiocStyle'
--- failed re-building 'StepReg.Rmd'

SUMMARY: processing the following file failed:
   'StepReg.Rmd'

Error: Vignette re-building failed.
Execution halted

For version 1.5.0 (https://cran.r-project.org/web/packages/StepReg/index.html), 
I successfully uploaded it to CRAN without including 'biocViews:' in the 
DESCRIPTION file two months ago. However, I'm encountering difficulties this 
time. Any insights or suggestions on resolving this issue would be greatly 
appreciated.

Thanks,
Junhui

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

2024-05-15 Thread Merlise Clyde, Ph.D.
Sent as mistake - my apologies!

Get Outlook for iOS

From: R-package-devel  on behalf of 
Merlise Clyde, Ph.D. 
Sent: Wednesday, May 15, 2024 7:45:46 PM
To: David Cortes ; r-package-devel@r-project.org 

Subject: Re: [R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

Are R ALTREP objects memory mapped


Get Outlook for 
iOS

From: R-package-devel  on behalf of 
David Cortes 
Sent: Wednesday, May 15, 2024 12:54:37 PM
To: r-package-devel@r-project.org 
Subject: [R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

I'm seeing some issues using R Altrep classes when compiling a package
with the MSVC compiler on windows.

While CRAN doesn't build windows binaries with this compiler, some
packages such as Arrow and LightGBM have had some success in building
their R packages with MSVC outside of CRAN, in order to enable
functionalities that MinGW doesn't support.

Some R headers do not work out-of-the-box with MSVC, but can be made to
work by using alternative declarations of data structures which the
headers provide. For example, defining the macro 'R_LEGACY_RCOMPLEX'
switches to an alternate declaration of R's complex type, which
compiles just fine under msvc, while the regular declaration doesn't
compile.

I am now trying to use Altrep classes in a package. The code compiles
without errors under MSVC, but executing code that involves returning
Altrep objects leads to segfaults and memory corruptions, even though
it works fine under other compilers.

I see the R Altrep header has this section:
#define STRUCT_SUBTYPES
#ifdef STRUCT_SUBTYPES
# define R_SEXP(x) (x).ptr
# define R_SUBTYPE_INIT(x) { x }
  typedef struct { SEXP ptr; } R_altrep_class_t;
#else
# define R_SEXP(x) ((SEXP) (x))
# define R_SUBTYPE_INIT(x) (void *) (x)
  typedef struct R_altcls *R_altrep_class_t;
#endif

Link:
https://urldefense.com/v3/__https://github.com/wch/r-source/blob/531d0fd05d3bdc0f8a0350e3ecd3e101d315ab59/src/include/R_ext/Altrep.h*L33__;Iw!!OToaGQ!sO-S2sqzEKxviRHAbRPwKMl4JgRCoBJIOsL5KIIERL8DuU4I4R_JUOIagZqVcH54jScJLr5u6WJWlmymhkOuF-R4wQ$

If I manually edit the R header to remove the definition of
'STRUCT_SUBTYPES', leading to the second definition of
'R_altrep_class_t' being used, then things work as expected when the
package is compiled with MSVC (no segfaults and no memory corruptions).

Unfortunately, the Altrep header forcibly defines the macro right there
before the #ifdef. I am guessing that the alternative defintion was
offered there in order for users to try it out with problematic
compilers, but it doesn't seem to be configurable like
'R_LEGACY_RCOMPLEX'.

Is there some way that I can get an R package to use the alternative
declaration of 'R_altrep_class_t' when including that header, or
otherwise some other solution for using Altrep classes under MSVC?

__
R-package-devel@r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!OToaGQ!sO-S2sqzEKxviRHAbRPwKMl4JgRCoBJIOsL5KIIERL8DuU4I4R_JUOIagZqVcH54jScJLr5u6WJWlmymhkMDdZo2_A$

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!OToaGQ!sQGikKTlQoAmI45egICo7N98HJfNnTCQsgj5Ph6gyLGcSVZNHMX3AhYeQ4yyzUmAdga3rulxYRXeAg$

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

2024-05-15 Thread Merlise Clyde, Ph.D.
Are R ALTREP objects memory mapped


Get Outlook for iOS

From: R-package-devel  on behalf of 
David Cortes 
Sent: Wednesday, May 15, 2024 12:54:37 PM
To: r-package-devel@r-project.org 
Subject: [R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

I'm seeing some issues using R Altrep classes when compiling a package
with the MSVC compiler on windows.

While CRAN doesn't build windows binaries with this compiler, some
packages such as Arrow and LightGBM have had some success in building
their R packages with MSVC outside of CRAN, in order to enable
functionalities that MinGW doesn't support.

Some R headers do not work out-of-the-box with MSVC, but can be made to
work by using alternative declarations of data structures which the
headers provide. For example, defining the macro 'R_LEGACY_RCOMPLEX'
switches to an alternate declaration of R's complex type, which
compiles just fine under msvc, while the regular declaration doesn't
compile.

I am now trying to use Altrep classes in a package. The code compiles
without errors under MSVC, but executing code that involves returning
Altrep objects leads to segfaults and memory corruptions, even though
it works fine under other compilers.

I see the R Altrep header has this section:
#define STRUCT_SUBTYPES
#ifdef STRUCT_SUBTYPES
# define R_SEXP(x) (x).ptr
# define R_SUBTYPE_INIT(x) { x }
  typedef struct { SEXP ptr; } R_altrep_class_t;
#else
# define R_SEXP(x) ((SEXP) (x))
# define R_SUBTYPE_INIT(x) (void *) (x)
  typedef struct R_altcls *R_altrep_class_t;
#endif

Link:
https://urldefense.com/v3/__https://github.com/wch/r-source/blob/531d0fd05d3bdc0f8a0350e3ecd3e101d315ab59/src/include/R_ext/Altrep.h*L33__;Iw!!OToaGQ!sO-S2sqzEKxviRHAbRPwKMl4JgRCoBJIOsL5KIIERL8DuU4I4R_JUOIagZqVcH54jScJLr5u6WJWlmymhkOuF-R4wQ$

If I manually edit the R header to remove the definition of
'STRUCT_SUBTYPES', leading to the second definition of
'R_altrep_class_t' being used, then things work as expected when the
package is compiled with MSVC (no segfaults and no memory corruptions).

Unfortunately, the Altrep header forcibly defines the macro right there
before the #ifdef. I am guessing that the alternative defintion was
offered there in order for users to try it out with problematic
compilers, but it doesn't seem to be configurable like
'R_LEGACY_RCOMPLEX'.

Is there some way that I can get an R package to use the alternative
declaration of 'R_altrep_class_t' when including that header, or
otherwise some other solution for using Altrep classes under MSVC?

__
R-package-devel@r-project.org mailing list
https://urldefense.com/v3/__https://stat.ethz.ch/mailman/listinfo/r-package-devel__;!!OToaGQ!sO-S2sqzEKxviRHAbRPwKMl4JgRCoBJIOsL5KIIERL8DuU4I4R_JUOIagZqVcH54jScJLr5u6WJWlmymhkMDdZo2_A$

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] EXTERNAL: CRAN packages dependency on bioconductor packages

2024-05-15 Thread Ramos Perez, Marcel
Hi Junhui,

There are about 25 packages in CRAN that use BiocStyle, including yours.
It seems that MetaIntegrator is also facing the same error. I have not
looked too deeply into the issue but it seems that you should also
include "rmarkdown" in the Suggests field.

AFAIK, there is no need to include an empty `biocViews:` field in the
DESCRIPTION. CRAN knows about Bioconductor repositories via
setRepositories().

Note. Users should use BiocManager to resolve Bioconductor dependencies
(rather than setRepositories).

Best regards,
Marcel


From: R-package-devel  on behalf of Li, 
Junhui 
Sent: Tuesday, May 14, 2024 3:51 PM
To: r-package-devel@r-project.org 
Subject: EXTERNAL: [R-pkg-devel] CRAN packages dependency on bioconductor 
packages

Hi everyone,

I recently developed an R package called 'StepReg' and used the Bioconductor R 
package 'BiocStyle' in my vignettes, as shown below:

output:
  BiocStyle::html_document:
toc_float: true
  BiocStyle::pdf_document: default

In my DESCRIPTION file, I added 'BiocStyle' to the Suggests field and included 
a new line 'biocViews:', as follows:

VignetteBuilder: knitr
biocViews:
Suggests:
knitr,
testthat,
BiocStyle,
kableExtra

You may find all those information here: 
https://github.com/JunhuiLi1017/StepReg/tree/dev

There were no error messages when checking with 'R CMD check' and on 
https://win-builder.r-project.org/upload.aspx. However, an error message 
occurred when I attempted to upload it to CRAN:

* checking re-building of vignette outputs ... ERROR
Error(s) in re-building vignettes:
--- re-building 'StepReg.Rmd' using rmarkdown
Error: processing vignette 'StepReg.Rmd' failed with diagnostics:
there is no package called 'BiocStyle'
--- failed re-building 'StepReg.Rmd'

SUMMARY: processing the following file failed:
   'StepReg.Rmd'

Error: Vignette re-building failed.
Execution halted

For version 1.5.0 (https://cran.r-project.org/web/packages/StepReg/index.html), 
I successfully uploaded it to CRAN without including 'biocViews:' in the 
DESCRIPTION file two months ago. However, I'm encountering difficulties this 
time. Any insights or suggestions on resolving this issue would be greatly 
appreciated.

Thanks,
Junhui

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


This email message may contain legally privileged and/or confidential 
information.  If you are not the intended recipient(s), or the employee or 
agent responsible for the delivery of this message to the intended 
recipient(s), you are hereby notified that any disclosure, copying, 
distribution, or use of this email message is prohibited.  If you have received 
this message in error, please notify the sender immediately by e-mail and 
delete this email message from your computer. Thank you.
[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Interpretation of rhub check failures

2024-05-15 Thread Leonardo Cefalo

Dear all,

I should submit a new version of the package SchoolDataIT 
 and 
before doing so I need to check it on multiple flavors.


So I have started trying some checks with rhub.
I have loaded the new version of the package on github 
.
It basically fails all checks, even if changes with respect to the 
previous version (the one on CRAN) are minor and should have no impact 
on the *most likely* causes of error, nor do devtools::check() or 
devtools::check_win_devel() return any error (but I cannot rely solely 
on these two checks since I have already experienced how unpredictably 
they behave on different flavors).


What I am wondering about, however, is how to interpret error outputs 
like this 
(https://github.com/lcef97/SchoolDataIT/actions/runs/9092369467/job/24988944819, 
ubuntu-clang) or 
this(https://github.com/lcef97/SchoolDataIT/actions/runs/9092427648/job/24989126404 
atlas). I guess something wrong happens in the functions with 
--run-donttest.


Could somebody please point me a way to interpret  these failures, or 
way to run checks with operating systems different than mine that does 
not involve the passage on github?


Thank you very much in advance
Best regards
Leonardo

Sostieni la formazione e la ricerca universitaria con il tuo 5 per mille 
all'Università di Bari.
Firma la casella "Finanziamento della ricerca scientifica e della 
Università"

indicando il codice fiscale 80002170720.

Il tuo contributo può fare la differenza: oggi più che mai!

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Altrep header, MSVC, and STRUCT_SUBTYPES macro

2024-05-15 Thread David Cortes
I'm seeing some issues using R Altrep classes when compiling a package
with the MSVC compiler on windows.

While CRAN doesn't build windows binaries with this compiler, some
packages such as Arrow and LightGBM have had some success in building
their R packages with MSVC outside of CRAN, in order to enable
functionalities that MinGW doesn't support.

Some R headers do not work out-of-the-box with MSVC, but can be made to
work by using alternative declarations of data structures which the
headers provide. For example, defining the macro 'R_LEGACY_RCOMPLEX'
switches to an alternate declaration of R's complex type, which
compiles just fine under msvc, while the regular declaration doesn't
compile.

I am now trying to use Altrep classes in a package. The code compiles
without errors under MSVC, but executing code that involves returning
Altrep objects leads to segfaults and memory corruptions, even though
it works fine under other compilers.

I see the R Altrep header has this section:
#define STRUCT_SUBTYPES
#ifdef STRUCT_SUBTYPES
# define R_SEXP(x) (x).ptr
# define R_SUBTYPE_INIT(x) { x }
  typedef struct { SEXP ptr; } R_altrep_class_t;
#else
# define R_SEXP(x) ((SEXP) (x))
# define R_SUBTYPE_INIT(x) (void *) (x)
  typedef struct R_altcls *R_altrep_class_t;
#endif

Link:
https://github.com/wch/r-source/blob/531d0fd05d3bdc0f8a0350e3ecd3e101d315ab59/src/include/R_ext/Altrep.h#L33

If I manually edit the R header to remove the definition of
'STRUCT_SUBTYPES', leading to the second definition of
'R_altrep_class_t' being used, then things work as expected when the
package is compiled with MSVC (no segfaults and no memory corruptions).

Unfortunately, the Altrep header forcibly defines the macro right there
before the #ifdef. I am guessing that the alternative defintion was
offered there in order for users to try it out with problematic
compilers, but it doesn't seem to be configurable like
'R_LEGACY_RCOMPLEX'.

Is there some way that I can get an R package to use the alternative
declaration of 'R_altrep_class_t' when including that header, or
otherwise some other solution for using Altrep classes under MSVC?

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [Rd] FR: Customize background colour of row and column headers for the View output

2024-05-15 Thread Duncan Murdoch
A criticism of your suggestion is that it is not backwards compatible. 
Does that matter?  I don't know, but probably not.  The X11 version of 
the viewer does what you suggest.


Duncan Murdoch

On 2024-05-15 2:20 a.m., Iago Giné Vázquez wrote:

About the decisions:

Actually, the same way dataedittext modifies the text colour not only
of data, but also of row and column names, and dataedituser modifies
the colour of all the borders, I think dataeditbg should modify the
background of all the window, at least that "inside" those
borders. Otherwise, any other option for the background colour on row
and column headers would allow the same set of colours and with the
same names, which are those commented in Rconsole:

## Colours for console and pager(s)
# (see rw/etc/rgb.txt for the known colours).

Regarding the code, looking to the Windows data editor [1], and taking
into account what you and lastly Ivan told previously

     This is entirely correct: the dialog uses the colour returned by
     dialog_bg(), which is GetSysColor(COLOR_BTNFACE).

(maybe a naive question from who does not know the code), could not be
used `guiColors[dataeditbg]` instead of `dialog_bg()` in the unique
place this is present?. So, instead of

     bbg = dialog_bg()

it would appear

     bbg = guiColors[dataeditbg];


Thanks!
Iago


[1] 
https://svn.r-project.org/R/trunk/src/library/utils/src/windows/dataentry.c 


*De:* Duncan Murdoch 
*Enviat el:* dimarts, 14 de maig de 2024 14:22
*Per a:* Iago Giné Vázquez ; r-devel@R-project.org 


*A/c:* Ivan Krylov 
*Tema:* Re: FR: Customize background colour of row and column headers 
for the View output

This seems like something that should be fairly easily doable.  Why
don't you work out a patch?

Some decisions to make:

- What colours are we talking about?  Would you want the labels to have
their colour set independent of the dialog colours?  If so, would you
also want to configure the dialog colours?

- What names should be used for the colours?

- Where should all of these definitions be documented?

If you don't feel comfortable with the coding, perhaps you could answer
these questions, and someone else may code it for you.  I won't (I no
longer have easy access to Windows), but I could help with the design.

Duncan Murdoch

On 2024-05-14 5:25 a.m., Iago Giné Vázquez wrote:

Thanks again Duncan and Ivan,

I forward then the email to R-devel.

Summarizing, the dataedit options (in RGui preferences or RConsole) to
colouring the View output do not have effect on the background of the row
and column names (see https://ibb.co/Dkn2pVs  >).


Could this be implemented?

Thank you!

Best regards,
Iago

*De:* Ivan Krylov 
*Enviat el:* dilluns, 13 de maig de 2024 14:34
*Per a:* Duncan Murdoch 
*A/c:* Iago Giné Vázquez ; r-h...@r-project.org 


*Tema:* Re: [R] Is there some way to customize colours for the View output?
В Mon, 13 May 2024 06:08:22 -0400
Duncan Murdoch  пишет:


The row and column names don't appear to be controllable from that
menu, they seem (on my machine) to be displayed in the same colour as
the background of a dialog box, i.e. some kind of gray.  I don't
think R tries to control that colour, but perhaps some Windows
setting would change it.


This is entirely correct: the dialog uses the colour returned by
dialog_bg(), which is GetSysColor(COLOR_BTNFACE).

I think it could be a reasonable feature request to use an adjustable
colour for the row and column headers.

--
Best regards,
Ivan




__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] FR: Customize background colour of row and column headers for the View output

2024-05-15 Thread Iago Giné Vázquez
About the decisions:

Actually, the same way dataedittext modifies the text colour not only
of data, but also of row and column names, and dataedituser modifies
the colour of all the borders, I think dataeditbg should modify the
background of all the window, at least that "inside" those
borders. Otherwise, any other option for the background colour on row
and column headers would allow the same set of colours and with the
same names, which are those commented in Rconsole:

## Colours for console and pager(s)
# (see rw/etc/rgb.txt for the known colours).

Regarding the code, looking to the Windows data editor [1], and taking
into account what you and lastly Ivan told previously

This is entirely correct: the dialog uses the colour returned by
dialog_bg(), which is GetSysColor(COLOR_BTNFACE).

(maybe a naive question from who does not know the code), could not be
used `guiColors[dataeditbg]` instead of `dialog_bg()` in the unique
place this is present?. So, instead of

bbg = dialog_bg()

it would appear

bbg = guiColors[dataeditbg];


Thanks!
Iago


[1] https://svn.r-project.org/R/trunk/src/library/utils/src/windows/dataentry.c

De: Duncan Murdoch 
Enviat el: dimarts, 14 de maig de 2024 14:22
Per a: Iago Gin�� V��zquez ; r-devel@R-project.org 

A/c: Ivan Krylov 
Tema: Re: FR: Customize background colour of row and column headers for the 
View output

This seems like something that should be fairly easily doable.  Why
don't you work out a patch?

Some decisions to make:

- What colours are we talking about?  Would you want the labels to have
their colour set independent of the dialog colours?  If so, would you
also want to configure the dialog colours?

- What names should be used for the colours?

- Where should all of these definitions be documented?

If you don't feel comfortable with the coding, perhaps you could answer
these questions, and someone else may code it for you.  I won't (I no
longer have easy access to Windows), but I could help with the design.

Duncan Murdoch

On 2024-05-14 5:25 a.m., Iago Gin�� V��zquez wrote:
> Thanks again Duncan and Ivan,
>
> I forward then the email to R-devel.
>
> Summarizing, the dataedit options (in RGui preferences or RConsole) to
> colouring the View output do not have effect on the background of the row
> and column names (see https://ibb.co/Dkn2pVs ).
>
> Could this be implemented?
>
> Thank you!
>
> Best regards,
> Iago
> 
> *De:* Ivan Krylov 
> *Enviat el:* dilluns, 13 de maig de 2024 14:34
> *Per a:* Duncan Murdoch 
> *A/c:* Iago Gin�� V��zquez ; r-h...@r-project.org
> 
> *Tema:* Re: [R] Is there some way to customize colours for the View output?
> �� Mon, 13 May 2024 06:08:22 -0400
> Duncan Murdoch  ��ڧ�֧�:
>
>> The row and column names don't appear to be controllable from that
>> menu, they seem (on my machine) to be displayed in the same colour as
>> the background of a dialog box, i.e. some kind of gray.  I don't
>> think R tries to control that colour, but perhaps some Windows
>> setting would change it.
>
> This is entirely correct: the dialog uses the colour returned by
> dialog_bg(), which is GetSysColor(COLOR_BTNFACE).
>
> I think it could be a reasonable feature request to use an adjustable
> colour for the row and column headers.
>
> --
> Best regards,
> Ivan


[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel