applyDataSubset: Modify and apply data subsets

Description Usage Arguments Value Examples

View source: R/subsetting.R

Description

In analyzing (and especially graphing) NONMEM data sets, it is often convenient to work with subsets of data that exclude certain rows of data, such as dosing data. These four functions can be used to modify and retrieve associated data subsets with particular NONMEM data objects.

Usage

1
2
3
4
5
	applyDataSubset(obj, sub = NULL, verboseWarnings = FALSE)
	dataSubset(x)
	dataSubset(x) <- value
	augmentDataSubset(x) <- value
	

Arguments

x

Object (NMProblem or data.frame) whose subset should be modified or retrieved.

obj

Object of class data.frame to which a subset will be applied

value

Character vector of subset expressions

sub

Character vector of subset expressions

verboseWarnings

Logical flag. If TRUE, will emit a warning whenever a subset statement fails

Value

applyDataSubset will return the data.frame obj with the (valid) subsetting expressions applied. dataSubset the data subset associated with an object.

Examples

1
2
3
4
5
6
7
8
9
	## Not run: 
		x <- importNm("TestData1.ctl", "TestData1.lst", path  = "testing/testdata/TestRun")
		prob <- getProblem(x)
		print(dataSubset(prob))
		z <- nmData(prob, subset = c(dataSubset(prob), "ID < 20"))
		print(summary(z))
	
	
## End(Not run)

MangoTheCat/RNMImport documentation built on Aug. 5, 2018, 4:09 p.m.