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
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
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)
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())
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 = "
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() |>
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
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
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
> 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
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
11 matches
Mail list logo