Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rxExpandGrid

Faster expand.grid


Description

Only support x and y as characters right now

Usage

rxExpandGrid(x, y, type = 0L)

Arguments

x

first element (must be character)

y

second element (must be character)

type

Internal type=0L is traditional expand grid and type=1L is jacobian expand grid (adds symbols)

Value

Expand grid

Author(s)

Matthew Fidler

Examples

##
rxExpandGrid(letters, letters)

## Another fast method; See
## https://stackoverflow.com/questions/10405637/use-outer-instead-of-expand-grid

expand.grid.jc <- function(seq1,seq2) {
 cbind(Var1 = rep.int(seq1, length(seq2)),
  Var2 = rep.int(seq2, rep.int(length(seq1),length(seq2))))
}


 microbenchmark::microbenchmark(rxExpandGrid(letters, letters), expand.grid.jc(letters, letters))

RxODE

Facilities for Simulating from ODE-Based Models

v1.0.9
GPL (>= 3)
Authors
Matthew L. Fidler [aut] (<https://orcid.org/0000-0001-8538-6691>), Melissa Hallow [aut], Wenping Wang [aut, cre], Zufar Mulyukov [ctb], Alan Hindmarsh [ctb], Awad H. Al-Mohy [ctb], Matt Dowle [ctb], Cleve Moler [ctb], David Cooley [ctb], Drew Schmidt [ctb], Arun Srinivasan [ctb], Ernst Hairer [ctb], Gerhard Wanner [ctb], Goro Fuji [ctb], Hadley Wickham [ctb], Jack Dongarra [ctb], Linda Petzold [ctb], Martin Maechler [ctb], Matteo Fasiolo [ctb], Morwenn [ctb], Nicholas J. Higham [ctb], Roger B. Sidje [ctb], Simon Frost [ctb], Kevin Ushey [ctb], Yu Feng [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.