This package includes some helper functions for different tasks...
You can install the development version of davtools from GitHub with:
install.packages("devtools") # if you have not installed "devtools" package
devtools::install_github("dizyd/davtools")
So far these functions are available (use ?function_name
to see what they are doing):
print_bf()
: Print Bayes Factors in Markdown filesmake_df_readme()
: create summary of a data.frame in form of a Markdown tablemean_sd()
: Print mean and standarddeviation of a variable in Markdown filesRMSE()
: Compute the root-mean-squared-error (RMSE) between two numeric variablesexpand_grid_unique()
: Make a grid of uniqe factor combinations (i.e., ignoring order of factors)sigma_tau()
: Transform sigma to tau (i.e. precision in JAGS) or the other way aroundflattenlist()
: Flatten a highly nested list as returned byforeach()
into a simple listinstall_n_load_packages()
: Load packages and install missing packages if necessarysave_results()
: Save an R object as.Rdata
with the current date automatically appended to the file namerbern()
: Generate random Bernoulli distributed samples
Available datasets are:
res_rt
This is a basic example which shows you how to solve a common problem:
library(davtools)
RMSE(x = rnorm(100),
y = rnorm(100))
mean_sd(rnorm(100,23,10))
print_bf(17286345)