Frtab.sub {NMTox}R Documentation

Count the number of observations for each unique value of a variable on a subset of data

Description

This function counts the number of observations for each unique value of a variable on a subset of data. The subset of data is created according to the specified endpoint and unit of measurement of the dose.

Usage

Frtab.sub(data.nm, data.control, id, nano, dose, end, end.cat, unit,
  unit.cat, control.opt=c("same","all"), x)

Arguments

data.nm

Data containing the result of toxicity study

data.control

Data of control values

id

Identifier of the experiment

nano

Name of the nanomaterial

dose

Dose or concentration

end

Toxicity endpoint

end.cat

Specific toxicity endpoint of interest

unit

Unit of measurement of the dose

unit.cat

Specific unit of measurement of the dose

control.opt

Option for the control doses. If only control doses with the same unit of measurement as the non-control ones are included, then specify "same" in the control.opt. If all control doses with any units of measurement are included, then specify "all".

x

Variable to be explored

Details

Value

This function generates a table containing the number of observations for each unique value of a variable on a subset of data

Examples

# Create a dataset containing controls (which are named differently)
# from geninvitro dataset:
controldata<-SubsetData(data=geninvitro, x="name", x.cat=c("control",
             "Control", "medium", "medium + BSA", "untreated"))

# Exclude controls (which are named differently) from geninvitro dataset:
invitrodata<-SubsetData(data=geninvitro, x="name", x.cat=c("control",
             "Control", "medium", "medium + BSA", "untreated"), include=FALSE)

# Frequency of each unique value of the dose for each nanomaterial
# in geninvitro dataset, with DNA STRAND BREAKS as the toxicity endpoint
# and only observations with concentration measured in "ug/cm2" are considered:
#
Frtab.sub(data.nm=invitrodata, data.control=controldata, nano="name",
           end="endpoint", end.cat="DNA STRAND BREAKS", id="experimentID",
           dose="concentration", unit="concentration_unit", unit.cat="ug/cm2",
           control.opt="same", x="concentration")


[Package NMTox version 0.1.0 Index]