ReadFile: Read File

View source: R/basic_functions.R

ReadFileR Documentation

Read File

Description

opens connection to a file

Usage

ReadFile(
  file = NULL,
  path = "models/",
  package = "bfw",
  type = "string",
  sep = ",",
  data.format = "txt",
  custom = FALSE
)

Arguments

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

See Also

read.csv

Examples

# Print JAGS model for bernoulli trials
cat(ReadFile("stats_bernoulli"))
# model {
#   for (i in 1:n){
#     x[i] ~ dbern(theta)
#   }
#   theta ~ dunif(0,1)
# }

oeysan/bfw documentation built on March 27, 2022, 7:41 p.m.