ReadFile: Read File

Description Usage Arguments See Also Examples

View source: R/basic_functions.R

Description

opens connection to a file

Usage

1
2
3
4
5
6
7
8
9
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

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

bfw documentation built on Jan. 11, 2020, 9:29 a.m.