read_dataset: Read a dataset from a text file

Description Usage Arguments Details Value See Also Examples

View source: R/read_write.R

Description

The text file may be separated by commas, tabs, or any other commonly used delimiter. The first row must have the following elements:

Usage

1
2
read_dataset(filepath, negative_control = NA, plate_id = "plate_1",
  sep = "\t")

Arguments

filepath

Path to the file to load. If the full path is not given, R will assume the file is in the current working directory.

negative_control

A designation for the negative controls in this dataset, if they exist. Value may be NA, a number, a string, or a data frame.

  • NA: Use when there are no negative control measurements. The contents of the column named 'value_normalized' will be copied from the contents of the column named 'value'.

  • Number: Use when each treatment has been labeled with a concentration (typically 0) that indicates the vehicle control. Each treatment must contain one or more observations with this concentration, and these observations will be the negative controls.

  • string: Use when a single set of observations is a universal control. The treatment whose name matches the string is the universal negative control all of the data.

  • data frame: Use when more than one negative control exists, and you have to map different treatments to a particular negative control. The data frame must have names 'drug' and 'vehicle', and the data frame will map match treatments in the 'drug' column to those in the 'vehicle' column.

plate_id

A string identifying this set of observations. Defaults to "plate_1".

sep

A character that separates elements in the text file. Fefaults to tab.

Details

The text file may optionally contain a column called "hour", indicating the time point of the measurement. If "hour" is present the value must be a number.

Value

A data frame for the dataset matching the output of the create_dataset function.

See Also

create_dataset

Examples

1
2
3
pkg = "HTDoseResponseCurve"
fn_txt = system.file("extdata", "sample_data_1.txt", package = pkg)
ds = read_dataset( fn_txt, negative_control="DMSO" )

DavidQuigley/HTDoseResponseCurve documentation built on Jan. 23, 2021, 5:10 a.m.