View source: R/basic_functions.R
ReadFile | R Documentation |
opens connection to a file
ReadFile( file = NULL, path = "models/", package = "bfw", type = "string", sep = ",", data.format = "txt", custom = FALSE )
file |
name of file, Default: NULL |
path |
path to file, Default: 'models/' |
package |
choose package to open from, Default: 'bfw' |
type |
Type of file (i.e., text or data), Default: 'string' |
sep |
symbol to separate data (e.g., comma-delimited), Default: ',' |
data.format |
define what data format is being used, Default: 'csv' |
custom |
logical, indicating whether or not to use custom file, , Default: FALSE |
read.csv
# Print JAGS model for bernoulli trials cat(ReadFile("stats_bernoulli")) # model { # for (i in 1:n){ # x[i] ~ dbern(theta) # } # theta ~ dunif(0,1) # }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.