Learn R Programming

RChronoModel (version 0.4)

ImportCSV: Importing a CSV file containing the output of the MCMC algorithm

Description

Use of the read.csv with th default values for CSV files extracted from ChronoModel software

Usage

ImportCSV(file, dec = '.', sep=',', comment.char='#', header = TRUE)

Arguments

file
the name of the CSV file containing the output of the MCMC algorithm
dec
the character used in the file for decimal points for the use of read.csv()
sep
the field separator character for the use of read.csv()
comment.char
a character vector of length one containing a single character or an empty string for the use of read.csv()
header
a logical value indicating whether the file contains the names of the variables as its first line.

Value

Returns a dataframe containing a representation of the data in the file.

Examples

Run this code
  data(Events)
  write.csv(Events, "data.csv", row.names=FALSE)
  ImportCSV("data.csv")
  ImportCSV("data.csv", dec = '.', sep=',', comment.char='#', header = TRUE)

Run the code above in your browser using DataLab