# Example 1:
# 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)
#
# Generate dose-response plot for geninvitro, with DNA STRAND BREAKS as the
# endpoint, concentrations measured in ug/cm2 and controls measured in any
# units of measurement:
#
nmplot(data.nm=invitrodata, data.control=controldata, id="experimentID",
nano="name", response="value", dose="concentration", end="endpoint",
end.cat="DNA STRAND BREAKS", unit="concentration_unit",
unit.cat="ug/cm2", type="dose", control.opt="all")
# Example 2:
# Split geninvitro data according to the cell type and unit of the
# concentration and generate dose-response plot for each
# subset of data with DNA STRAND BREAKS as the endpoint:
#
nmplot(data.nm=invitrodata, data.control=controldata, id="experimentID",
nano="name", response="value", dose="concentration", end="endpoint",
end.cat="DNA STRAND BREAKS", type="dose", nrow=2, ncol=2,
vars=c("celltype","concentration_unit"))
Run the code above in your browser using DataLab