The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
Tools for working with random draws, including draws from a simulation or Bayesian analysis. The main data structure is an rvec
, which holds multiple draws but which behaves (mainly) like a standard R vector.
install.packages("rvec") ## CRAN version
devtools::install_github("bayesiandemography/rvec") ## development version
Create an rvec
.
x <- rvec(rbind(c(10, 11),
c(100, 101),
c(1000, 1001)))
x
#> <rvec_dbl<2>[3]>
#> [1] 10,11 100,101 1000,1001
Perform arithmetic on it.
Put it in a tibble.
df <- tibble(g = c(1, 2, 1), x)
df
#> # A tibble: 3 × 2
#> g x
#> <dbl> <rdbl<2>>
#> 1 1 10,11
#> 2 2 100,101
#> 3 1 1000,1001
Manipulate it in a tibble.
df %>%
group_by(g) %>%
count(wt = x)
#> # A tibble: 2 × 2
#> # Groups: g [2]
#> g n
#> <dbl> <rdbl<2>>
#> 1 1 1010,1012
#> 2 2 100,101
Summarise it.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.