accessor: Accessor

Description Usage Arguments Functions Examples

Description

Extract data from a Domain object.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'Domain'
x[i, j]

## S4 method for signature 'Domain'
x$name

## S4 replacement method for signature 'Domain'
x$name <- value

Arguments

x

(Domain).

i, j

(numeric or character)
indices of the columns/rows to select.

name

(character)
name of the object in x to access.

value

(atomic or domain).

Functions

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
dta <- DM(
  dm[1:3, c("STUDYID", "SUBJID", "RACE")],
  data.frame(row.names = "STUDYID", label = "Study Identifier")
)
dta
dta[1, ]
dta[, 1]
dta[1, 1]
dta[1:2, ]
dta[, 1:2]
dta[1:2, 1:2]

dta <- DM(
  dm[1:2, c("STUDYID", "SUBJID", "RACE", "AGE")],
  data.frame(row.names = "STUDYID", label = "Study Identifier")
)
dta
dta$RACE
dta$STUDYID


dta_1 <- DM(
  dm[1:3, c("STUDYID", "SUBJID", "ARMCD")],
  data.frame(
    row.names = "STUDYID",
    label = "Study Identifier",
    comment = "std"
  )
)

dta_1$new_var <- 1:3
dta_1

dta_2 <- DM(
  dm[1:3, c("STUDYID", "SUBJID", "AGE")],
  data.frame(
    row.names = c("STUDYID", "AGE"),
    names = c("Study Identifier", "Age"),
    label = c(NA, "Age")
  )
)
dta_2$AGE
dta_1$age <- dta_2$AGE
dta_1

FCACollin/ClinAD documentation built on Feb. 1, 2021, 12:22 a.m.