rpact: Confirmatory Adaptive Clinical Trial Design and Analysis

readDataset {rpact}R Documentation

Read Dataset


Reads a data file and returns it as dataset object.


readDataset(file, ..., header = TRUE, sep = ",", quote = "\"",
  dec = ".", fill = TRUE, comment.char = "",
  fileEncoding = "UTF-8")



A CSV file (see read.table).


Further arguments to be passed to coderead.table.


A logical value indicating whether the file contains the names of the variables as its first line.


The field separator character. Values on each line of the file are separated by this character. If sep = "," (the default for readDataset) the separator is a comma.


The set of quoting characters. To disable quoting altogether, use quote = "". See scan for the behavior on quotes embedded in quotes. Quoting is only considered for columns read as character, which is all of them unless colClasses is specified.


The character used in the file for decimal points.


logical. If TRUE then in case the rows have unequal length, blank fields are implicitly added.


character: a character vector of length one containing a single character or an empty string. Use "" to turn off the interpretation of comments altogether.


character string: if non-empty declares the encoding used on a file (not a connection) so the character data can be re-encoded. See the 'Encoding' section of the help for file, the 'R Data Import/Export Manual' and 'Note'.


readDataset is a wrapper function that uses read.table to read the CSV file into a data frame, transfers it from long to wide format with reshape and puts the data to getDataset.


Returns a Dataset object.

See Also

[Package rpact version 2.0.5 Index | www.rpact.org]