Chris,
this was not a change in interpretation, but rather CRAN's tools have gotten
better at detecting such bad behavior.
I would like to point out that there is absolutely no reason to mangle user's
.Renviron since the package can always set any environment variables it needs
from its (legal
19 ноября 2023 г. 04:01:22 GMT+03:00, "Iago Giné-Vázquez"
пишет:
>The package contains both C and Fortran code and in the criteria.c there is
>only a sprintf use, as follows:
>
>sprintf(msg,"criteria: error (%d) -> %s\n", inErr, errStr);
>Rf_error(msg);
Rf_error() takes format arguments like s
Thank you, Chris. I plan to explore the method you described as simply
removing the authorize function would be a shame. Your description of the
past was certainly worthwhile and enlightening.
Best,
Adam
On Sat, Nov 18, 2023 at 6:40 PM Kenny, Christopher <
christopherke...@fas.harvard.edu> wrote
You may also be able to use Rprintf ?
https://teuder.github.io/rcpp4everyone_en/060_printing_massages.html
On 2023-11-18 8:07 p.m., Iris Simmons wrote:
Yes, the reason for the error is the use of sprintf. You can instead use
snprintf where n is the maximum number of bytes to write, including
Thank you very much, Iris. Indeed that removed the warning.
Kind regards,
Iago
Sent with [Proton Mail](https://proton.me/) secure email.
On Sunday, 19 November 2023 at 02:07, Iris Simmons wrote:
> Yes, the reason for the error is the use of sprintf. You can instead use
> snprintf where n is t
Yes, the reason for the error is the use of sprintf. You can instead use
snprintf where n is the maximum number of bytes to write, including the
terminating nul character. For example:
char msg[8191];
snprintf(msg, 8191, "criteria: error (%d) -> %s\n", inErr, errStr);
Rf_error(msg);
or however la
Dear all,
I am updating a CRAN-archived R package, so it can get back to CRAN. But there
is a warning produced in Linux OS that I am not sure to understand and I do not
know how to solve, even after looking at ‘Writing portable packages’ in the
‘Writing R Extensions’ manual and after searching
Rather than using tools::R_user_dir(), you can also ask the user for a path
where they would like to save the information to. This allows you to test it
with a temporary directory file, but would allow the user to specify their
.Renviron file, if they so choose. This acts as a middle ground mana
Thank you so much for clarifying this.
Best,
Adam
On Sat, Nov 18, 2023 at 6:14 PM Simon Urbanek
wrote:
> Adam,
>
> no, it is your code in mm_authorize() that violates the CRAN policy, it is
> not about the test. You may not touch user's .Renviron and there is no
> reason to resort to such dras
Adam,
no, it is your code in mm_authorize() that violates the CRAN policy, it is not
about the test. You may not touch user's .Renviron and there is no reason to
resort to such drastic measures. If you want to cache user's credentials, you
have to do it in a file located via tools::R_user_dir()
Thank you dearly, Simon, for pointing out the policy. May a test do the
following?
1. Save the user's original value for env var X.
2. Write a new value for env var X during a test.
3. Write back the original value for env var X at the end of the test.
An example:
test_that("mm_authorize() sets
Adam,
> On Nov 19, 2023, at 9:39 AM, Adam wrote:
>
> Dear Ivan,
>
> Thank you for explaining in such depth. I had not submitted to CRAN before.
> I will look into tools::R_user_dir().
>
> - May you point me toward the policy that the package should not edit
> .Renviron?
It is the policy yo
Dear Ivan,
Thank you for explaining in such depth. I had not submitted to CRAN before.
I will look into tools::R_user_dir().
- May you point me toward the policy that the package should not edit
.Renviron? I thought I was following best practices, but maybe things have
changed. For instance, this
В Fri, 17 Nov 2023 17:08:13 -0500
Adam пишет:
> 1. The example should not be running in the first place, as it has
> @examplesIf megamation:::mm_has_creds(), which should be FALSE for
> CRAN (it depends on env. variables)
The tarball I have fished from CRAN says version 0.2.0, but your GitHub
re
I pass on Debian but have an ERROR on Windows dev. version of R. I'm
confused for 2 reasons:
1. The example should not be running in the first place, as it has
@examplesIf megamation:::mm_has_creds(), which should be FALSE for CRAN (it
depends on env. variables)
2. I see the example printed twice
15 matches
Mail list logo