all can be used in nimbleFunctions and compiled using
nimC(...) nimRep(x, ...) nimSeq(from, to, by, length.out)
values to be concatenated.
vector of values to be replicated (
starting value of sequence.
end value of sequence.
increment of the sequence.
desired length of the sequence.
seq, these functions are NIMBLE's version of similar R functions, e.g.,
rep. In a
nimbleFunction, either the R name (e.g.,
rep) or the NIMBLE name (e.g.,
nimRep) can be used. If the R name is used, it will be converted to the NIMBLE name. For
all simply use the standard name without
"nim". These functions largely mimic (see exceptions below) the behavior of their R counterparts, but they can be compiled in a
nimC is NIMBLE's version of
c and behaves identically.
nimRep is NIMBLE's version of
rep. It should behave identically to
rep. There are no NIMBLE versions of
nimSeq is NIMBLE's version of
seq. It behaves like
seq with support for
length.out arguments. The
along.with argument is not supported. There are no NIMBLE versions of
seq_len, with the exception that
seq_along can take a nimbleFunctionList as an argument to provide the index range of a for-loop (User Manual Ch. 13).
which behaves like the R version but without support for
diag behaves like the R version but without support for the
length behaves like the R version.
seq_along behaves like the R version.
is.na behaves like the R version but does not correctly handle
NA values from R that are type 'logical', so convert these using
as.numeric() before passing from R to NIMBLE.
is.nan behaves like the R version, but treats
NA of type 'double' as being
NA of type 'logical' as not being
any behaves like the R version but takes only one argument and treats NAs as
all behaves like the R version but takes only one argument and treats NAs as
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.