Re: [R-pkg-devel] Question regarding finding the source file location without R-packages outside of R-Studio

2023-11-23 Thread Berry Boessenkool
According to the description, this should be what you need: https://cran.r-project.org/web/packages/scriptName/ I only got NULL, but I also only tried within Rstudio... Here are some related questions, although you've probably already tried the answers:

Re: [R-pkg-devel] Error: [writeRaster] cannot write file

2023-10-09 Thread Berry Boessenkool
Are you intentionally running dir.exists on _file_names? dir.exists("existing_folder/imaginary.file") shows FALSE, somwhat counterintuitively. You might want to wrap the filenames in dirname... Regards, Berry From: R-package-devel on behalf of Keshav, Krishna

[R-pkg-devel] fortran integer(kind=)

2023-08-31 Thread Berry Boessenkool
Dear list members, my R package dwdradar uses Fortran code with the input parameter integer(KIND=2): https://github.com/brry/dwdradar/blob/master/src/binary_to_num.f90#L20 https://github.com/brry/dwdradar/blob/master/src/binary_to_num.f90#L55 The CRAN team wrote to change that (line breaks

Re: [R-pkg-devel] Trouble with long-running tests on CRAN debian server

2023-08-21 Thread Berry Boessenkool
If you add that to each exported function, isn't that a lot of code to read + maintain? Also, it seems like unnecessary computational overhead. >From a software design point of view, it might be nicer to set that in the >examples + tests. Regards, Berry From:

Re: [R-pkg-devel] How to declare Bioconductor Dependencies in the Description File of my R Package

2023-03-18 Thread Berry Boessenkool
I would use conditional returns to make the code more readable (see below) and then run the examples conditionally. check_limma <- function() # Returns TRUE if available, FALSE otherwise { if(requireNamespace("limma", quietly=TRUE)) return(TRUE) if(!interactive()) return(FALSE) inst <-

Re: [R-pkg-devel] mget with Inherits Not Finding Variable in Caller

2021-12-01 Thread Berry Boessenkool
I had the same problem recently when developing a package and have some code here that might help you understand scoping a bit more. It highlights the subtle difference between parent frame and environment. I don't want to spam this list, so feel free to ignore ;) Berry a <- function(x) {aa

Re: [R-pkg-devel] if statements in NAMESPACE file

2021-09-30 Thread Berry Boessenkool
One of the very best fortunes nominations! [...] I suspect something like if (stats::runif(1) > 0.5) export(someFunction) would work too, for a particularly frustrating experience for your users. It would mean half the installs export the function, and half don't. Duncan Murdoch

Re: [R-pkg-devel] WinBuilder error: dependency version not available

2021-08-09 Thread Berry Boessenkool
If it works on all other testing platforms, I'd just submit to CRAN and see if it works. You may also just wait out until ggtree works on winbuilder... Regards, Berry From: R-package-devel on behalf of Carrie Tribble Sent: Friday, August 6, 2021 22:34 To:

Re: [R-pkg-devel] how to provide an example for my package when I want to generate a figure

2021-04-13 Thread Berry Boessenkool
Hi Matthew, see the notes on examples in function documentations here: https://r-pkgs.org/man.html#man-functions if you use the Roxygen setup (which I recommend) or the corresponding info in WRE: https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-R-documentation-files

Re: [R-pkg-devel] Warning on r-oldrel-macos-x86_64

2020-10-25 Thread Berry Boessenkool
> Seems to be correct. In my code a data.frame is assigned with a column > "foo" and _without_ stringsAsFactors = FALSE. Later a function is called > which requires "foo" as character. > The default stringsAsFactors was changed to FALSE in R4.0.0. Hence, my > question: How "old" is the old

Re: [R-pkg-devel] Error in CHECK caused by dev.off()

2020-07-26 Thread Berry Boessenkool
One (late) additional command: in the following setup: pdf("some_path") plot(1) dev.off() if the plotting function fails, code execution stops and dev.off never gets called, leaving (potentially nested) devices open. I suggest: pdf("some_path") on.exit(dev.off(), add=TRUE) plot(1)

[R-pkg-devel] mode='wb' in download.file()

2020-07-13 Thread Berry Boessenkool
On a related note: I also need to set mode="wb" to download binary files on Windows in my rdwd package. I'm considering calling download.file() with that mode as the default. Is there any problem with that, potentially on other OS or for non-binary files? Feel free to comment here to not

Re: [R-pkg-devel] RES: Possible unknown color in r

2020-01-10 Thread Berry Boessenkool
Side Note: plot(1, col="#00FF", cex=4, pch=16) is black on my machine. The last two values are alpha (I think) and should be 00 for transparency. Instead of writing an extra function, you could also use col=NA. Berry From: R-package-devel on behalf of

Re: [R-pkg-devel] License of pre-built vignettes

2019-10-25 Thread Berry Boessenkool
You could also consider a static vignette withh R.rsp: https://cran.r-project.org/web/packages/R.rsp/vignettes/R_packages-Static_PDF_and_HTML_vignettes.pdf Berry > The vignettes contain code for simulations which causes the long > runtime. In examples of the

Re: [R-pkg-devel] Last released version FAIL

2019-08-26 Thread Berry Boessenkool
You should fix the problems in a new version and submit. Did you per accident submit the old version? Or did you get tricked by the part after "Current CRAN status"? Regards, Berry PS:You could easily get rid of the two notes as well. Looks like you need to put SegregationTests.jpg in

[R-pkg-devel] Rtools path space

2019-07-13 Thread Berry Boessenkool
Hi, I recently included native code to my package rdwd and have since been getting messages of Windows users not being able to install the source version. As far as I can tell, the problem is that their Rtools is installed in a path with a space. i.e C:/Program Files. * installing *source*

Re: [R-pkg-devel] R CMD check not finding my vignettes

2017-04-10 Thread Berry Boessenkool
The "missing" files or their directory are not by accident listed in Rbuildignore, right? From: R-package-devel on behalf of Uwe Ligges Sent: Friday, April 7, 2017 12:20 To: David

[R-pkg-devel] package API change

2017-01-18 Thread Berry Boessenkool
What's good practice to inform users about an API change? The package in question is extremeStat. Apparently, people actually use it. I don't have a userbase like Hadley, but I do receive emails with feature requests and code change suggestions. Since the change is rather big (going from

Re: [R-pkg-devel] Browser Level for Conditional Function Parameter

2015-08-20 Thread Berry Boessenkool
I always get the browser level change in combination with if-statements... You haven't by change at some point in time set debug(aFunction) If so, set undebug(aFunction) Berry From: dstr7...@uni.sydney.edu.au To: r-package-devel@r-project.org Date: Thu, 20 Aug 2015 05:00:06 + Subject:

[R-pkg-devel] browseURL in examples

2015-08-18 Thread Berry Boessenkool
Hi all, In the CRAN package policies [1], it says Packages should not start external software (such as PDF viewers or browsers) during examples or tests unless that specific instance of the software is explicitly closed afterwards. If I want to refer to a website with browseURL in the

Re: [R-pkg-devel] FW: CRAN submission berryFunctions 1.8.0

2015-06-03 Thread Berry Boessenkool
:19 + On Wed, 2015-06-03 at 09:51 +0200, Uwe Ligges wrote: On 03.06.2015 09:48, Berry Boessenkool wrote: Hi, after submitting my package update, CRAN (Brian Ripley) found a couple of warnings / messages. URLs that are not longer existent, a non-ASCII character from copypasting