Re: [R-pkg-devel] Workaround for code/documentation mismatch

2021-08-10 Thread Andrew Simmons
When not preceded by an expression wrapped in do(), %while% would throw an error "do while loop must begin with 'do'". The function %while% looks like `%while%` <- function (expr, cond) invisible(.Call(C_do.while, substitute(expr), substitute(cond), parent.frame())) and the corresponding C

Re: [R-pkg-devel] Workaround for code/documentation mismatch

2021-08-10 Thread Hugh Parsonage
What is the behaviour of %while% if not preceded by an expression wrapped in do() ? On Wed, 11 Aug 2021 at 1:26 pm, Andrew Simmons wrote: > Hello, > > > I've written two functions to emulate do while/until loops seen in other > languages, but I'm having trouble documenting its usage. The

[R-pkg-devel] Workaround for code/documentation mismatch

2021-08-10 Thread Andrew Simmons
Hello, I've written two functions to emulate do while/until loops seen in other languages, but I'm having trouble documenting its usage. The function is typically used like: do ({ expr1 expr2 ... }) %while% (cond) so I want to document it something like: do(expr) %while% (cond)

Re: [Rd] [External] problem with pipes, textConnection and read.dcf

2021-08-10 Thread luke-tierney
Not an issue with pipes. The pipe just rewrites the expression to a nested call and that is then evaluated. The call this produces is quote(L |> +gsub(pattern = " ", replacement = "") |> +gsub(pattern = " ", replacement = "") |> +textConnection() |> +read.dcf())

Re: [Rd] problem with pipes, textConnection and read.dcf

2021-08-10 Thread peter dalgaard
It's not a pipe issue: > textConnection(gsub(gsub(L, pattern = " ", replacement = ""), pattern = " ", > replacement = "")) Error in textConnection(gsub(gsub(L, pattern = " ", replacement = ""), : argument 'object' must deparse to a single character string > textConnection(gsub(L, pattern = "

[Rd] problem with pipes, textConnection and read.dcf

2021-08-10 Thread Gabor Grothendieck
This gives an error bit if the first gsub line is commented out then there is no error even though it is equivalent code. L <- c("Variable:id", "Length:112630 ") L |> gsub(pattern = " ", replacement = "") |> gsub(pattern = " ", replacement = "") |> textConnection() |>

Re: [Bioc-devel] EXTERNAL: Not possible to create runnable examples for package

2021-08-10 Thread Marcel Ramos
Hi Kelsey, One of the main reasons we have that 80% check is to induce modularity in a package. You can chain examples from several R files / functions in sequence according to collation order (collation field in the DESCRIPTION or alphabetical order). Ideally, you can use a small dataset for

[Bioc-devel] Not possible to create runnable examples for package

2021-08-10 Thread Kelsey Chetnik via Bioc-devel
I am preparing a package for submission to Bioconductor. One of the errors I got from running BioCheck() was "At least 80%of man pages documenting exported objects must have runnable examples". The way our package is constructed makes meeting this requirement practically impossible. Our

[R-pkg-devel] "polygon edge not found" on macos-arm64

2021-08-10 Thread IƱaki Ucar
Dear CRAN maintainers, I see there's a new WARN on the recently added macos-arm64 platform for quite a number of packages. Specifically, vignette rebuilding fails with "polygon edge not found" (example in [1]). In addition, there are a number of warnings like this: Warning in

Re: [Rd] attach "warning" is a message

2021-08-10 Thread Martin Maechler
> Simon Urbanek > on Tue, 10 Aug 2021 11:28:19 +1200 writes: > Barry, > it is not a warning nor plain output, it is a message, so you can use >> d = data.frame(x=1:10) >> x=1 >> suppressMessages(attach(d)) >> > Looking at the history, this used to be

[Rd] R 4.1.1 is released

2021-08-10 Thread Peter Dalgaard
The build system rolled up R-4.1.1.tar.gz (codename "Kick Things") this morning. The list below details the changes in this release. You can get the source code from https://cran.r-project.org/src/base/R-4/R-4.1.1.tar.gz or wait for it to be mirrored at a CRAN site nearer to you. Binaries