Re: [R-pkg-devel] Package Encoding and Literal Strings

2020-12-16 Thread jo...@jorisgoosen.nl
David, Thanks for the response! So the problem is a bit worse then just setting `encoding="UTF-8"` on functions like readLines. I'll describe our setup a bit: So we run R embedded in a separate executable and through a whole bunch of C(++) magic get that to the main executable that runs the

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Gábor Csárdi
On Wed, Dec 16, 2020 at 8:39 PM Henrik Bengtsson wrote: > > BTW, 'backports' provides a backport for tools::R_user_dir() also for > R (< 4.0.0), so an alternative solution in this case is: > > Imports: backports > > and > > importFrom(backports, R_user_dir) > > The 'backports' package takes the

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Henrik Bengtsson
BTW, 'backports' provides a backport for tools::R_user_dir() also for R (< 4.0.0), so an alternative solution in this case is: Imports: backports and importFrom(backports, R_user_dir) The 'backports' package takes the same approach as I did in my previous message. Henrik On Wed, Dec 16, 2020

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Henrik Bengtsson
Colin, you can do: Imports: tools NAMESPACE: if (getRversion() >= 4) importFrom(tools,R_user_dir) R/000.namespace.R: ## Create a dummy R_user_dir() for R (< 4.0.0) ## to please R CMD check if (getRversion() < 4) { R_user_dir <- function(...) NULL } and then use: if (getRversion() < 4) {

Re: [R-pkg-devel] Used package not updated - needs java < V 11

2020-12-16 Thread Knut Krueger
Am 15.12.20 um 14:37 schrieb Duncan Murdoch: thank you for your answer You should not have @importFrom XLConnect createSheet writeWorksheet saveWorkbook in your ROxygen comments; that results in an unconditional import. Instead, you should use fully qualified calls each time, i.e.

Re: [R-pkg-devel] Used package not updated - needs java < V 11

2020-12-16 Thread Knut Krueger
Thank you for your answer, I tested WriteXLS and openxlsx ... but it is perl based and most of the Windows user do not have perl installed. Therefore I would change the missing XlConnect with missing Perl library. And that is more complicated, because the user has to add something on

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Jeff Newmiller
For "obvious" reasons? I don't see this kind of avoidance as "obviously" correct at all. You have a dependency... it should be declared. There are various ways to proceed, with Imports or Depends or Suggests or pulling the code into your package... but trying to subvert the dependency

[R-pkg-devel] Package Encoding and Literal Strings

2020-12-16 Thread jo...@jorisgoosen.nl
Hello All, Some context, I am one of the programmers of a software pkg ( https://jasp-stats.org/) that uses an embedded instance of R to do statistics. And make that a bit easier for people who are intimidated by R or like to have something more GUI oriented. We have been working on translating

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Sebastian Meyer
Am 16.12.20 um 18:00 schrieb Neal Fultz: > IIRC some packages use get() instead of double-colon to suppress the NOTE. I'd discourage from using get() because you could (accidentally) access even unexported objects from another namespace. There is getExportedValue(ns, name) to avoid that.

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Neal Fultz
IIRC some packages use get() instead of double-colon to suppress the NOTE. I would probably ignore it myself. On Wed, Dec 16, 2020 at 8:29 AM Colin Gillespie wrote: > > Hi, > > I'm planning on using the tools::R_user_dir function in a package. But > for obvious reasons, I don't want to set the

Re: [R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread brodie gaslam via R-package-devel
I don't know if this will work in your case (or even if it is a good or bad thing to do), but backports conditionally exports the function in question, e.g.: https://github.com/r-lib/backports/blob/master/R/lengths.R So in that example their implementation of a function not available in R <

[R-pkg-devel] Accessing features in R4.0.

2020-12-16 Thread Colin Gillespie
Hi, I'm planning on using the tools::R_user_dir function in a package. But for obvious reasons, I don't want to set the dependency on R 4. My code is basically if (as.numeric(R.version$major) < 4) # do something else tools::R_user_dir("oysteR", which = "cache") When checking on win-builder

Re: [R-pkg-devel] Used package not updated - needs java < V 11

2020-12-16 Thread Duncan Murdoch
On 16/12/2020 10:21 a.m., Knut Krueger wrote: Am 15.12.20 um 14:37 schrieb Duncan Murdoch: thank you for your answer You should not have @importFrom XLConnect createSheet writeWorksheet saveWorkbook in your ROxygen comments; that results in an unconditional import. Instead, you should use

Re: [R-pkg-devel] FW: [CRAN-pretest-archived] CRAN submission valmetrics 1.0.0

2020-12-16 Thread Sebastian Meyer
In the check log, I see > * package encoding: UTF-8 > [...] > * checking PDF version of manual ... WARNING > LaTeX errors when creating PDF version. > This typically indicates Rd problems. > LaTeX errors found: > ! Package inputenc Error: Unicode char ‐ (U+2010) > (inputenc)not

Re: [R-pkg-devel] R CMD check warning on Solaris

2020-12-16 Thread Akshit Achara
Dear Duncan, Thanks for your detailed answer. Adding a test for checking the pandoc version resolves the issues. That was precisely what I needed. I have also added it to the SystemRequirements field, thanks for the suggestion. Thanks, Akshit Achara [[alternative HTML version

Re: [R-pkg-devel] FW: [CRAN-pretest-archived] CRAN submission valmetrics 1.0.0

2020-12-16 Thread Ivan Krylov
On Wed, 16 Dec 2020 07:12:04 + Kristin Piikki wrote: > Check: PDF version of manual, Result: WARNING > LaTeX errors when creating PDF version. > This typically indicates Rd problems. > LaTeX errors found: > ! Package inputenc Error: Unicode char ‐ (U+2010) > (inputenc)

[R-pkg-devel] FW: [CRAN-pretest-archived] CRAN submission valmetrics 1.0.0

2020-12-16 Thread Kristin Piikki
Dear R package developers, I have been trying a lot but I do not seem to find a solution to the problems with this new package (please see below and attached). It seems related to the building of the vignette. I would be very grateful if anyone could provide some advice. Kind regards, Kristin