Repository navigation
Expand file tree
/
Copy pathdefineR-faq.Rmd
More file actions
261 lines (164 loc) · 5.8 KB
/
Copy pathdefineR-faq.Rmd
File metadata and controls
261 lines (164 loc) · 5.8 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
---
title: "Frequently Asked Questions"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{FAQ}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
options(rmarkdown.html_vignette.check_title = FALSE)
```
Below are some frequently asked questions about the **defineR** package. Click
on the links below to navigate to the full question and answer content.
## Index{#top}
* [What is a define.xml?](#define)
* [How do I generate a define.xml for ADaM?](#adam)
* [Where can I get a metadata template?](#template)
* [Can I generate a define.xml for SEND?](#send)
* [Can I use my XPT files to generate a metadata file?](#xpt)
* [Can I use other files to generate a metadata file?](#other)
* [Does the package support define 2.1?](#version)
* [What if I want to use a different XSLT style sheet?](#styles)
* [Can it read in an existing define.xml?](#existing)
* [Is this the same template as the SAS® toolkit?](#sas)
## Content
### What is a define.xml? {#define}
**Q:** I don't quite understand what this is about. What is a define.xml?
Do I need one?
**A:** The define.xml is a special XML file used to describe data
sent to regulatory bodies for drug applications. If you don't know what it is,
then you don't need one.
[top](#top)
******
### How do I generate a define.xml for ADaM? {#adam}
**Q:** The **defineR** generator seems to always create a define.xml
for SDTM. I want to create one for ADaM. How can I do that?
**A:** There is a parameter called `type` on the `write_define()` function
that you can use to specify an SDTM or ADaM define. Here is an example:
```
# Get temporary directory for output
tmp <- tempdir()
# Create demo spreadsheet
pth <- write_metadata(tmp, type = "adam", demo = TRUE)
# Generate define for ADaM
res <- write_define(pth, tmp, type = "adam")
# View XML
# file.show(file.path(tmp, "define.adam.xml"))
# View check report
# file.show(file.path(tmp, "check.adam.pdf"))
# View HTML
# file.show(file.path(tmp, "define.adam.html"))
```
[top](#top)
******
### Where can I get a metadata template? {#template}
**Q:** I'd like to try out **defineR**. Where can I get a starting template?
**A:** You can generate a starting template. It it recommended to start
with the demo template, rather than a blank template. To do that,
set the `demo` option on the `write_metadata()` function. Like this:
```{r eval=FALSE, echo=TRUE}
# Get temporary directory
tmp <- tempdir()
# Create metadata template
write_metadata(tmp,
type = "<sdtm or adam>",
demo = TRUE)
```
[top](#top)
******
### Can I generate a define.xml for SEND? {#send}
**Q:** I am working on an animal study, and need to generate a define.xml
for SEND. Can **defineR** do that?
**A:** Not at this time. If you desire this feature, please submit
a request to the GitHub [issue list](https://github.com/dbosak01/defineR/issues).
[top](#top)
******
### Can I use my XPT files to generate a metadata file? {#xpt}
**Q:** I have some XPT files already. Can I use them to generate metadata?
**A:** Yes. Use the `write_metadata()` function, and supply the
`src_dir` parameter with the directory that contains your XPT files. Like this:
```{r eval=FALSE, echo=TRUE}
# Get temporary directory
tmp <- tempdir()
# Create metadata template
write_metadata(tmp,
type = "<sdtm or adam>",
src_dir = "<source data path>")
```
[top](#top)
******
### Can I use other files to generate a metadata file? {#other}
**Q:** What if I don't have XPT files? Can I generate metadata
from Excel files or SAS datasets?
**A:** Not in the current release. If you desire this feature,
please submit a request to the GitHub
[issue list](https://github.com/dbosak01/defineR/issues), and we can
up the priority.
[top](#top)
******
### Does the package support define 2.1? {#version}
**Q:** Our organization is getting ready for define version 2.1. Does
the **defineR** package support it?
**A:** Not yet. Define
version 2.1 will be coming in a future release.
[top](#top)
******
### What if I want to use a different XSLT style sheet? {#styles}
**Q:** I have a custom style sheet, and want to use it with
**defineR**. Can I do that?
**A:** Yes. There is a global option to specify a custom style sheet.
The option is called "defineR.xslt", and you can set it as follows:
```{r eval=FALSE, echo=TRUE}
options("defineR.xslt" = "<path>")
```
[top](#top)
******
### Can it read in an existing define.xml? {#existing}
**Q:** I have a define.xml alread and want to create a
metadata template from it. Can this package do it?
**A:** Not at this time. If there is sufficient interest in this feature,
we can add it.
[top](#top)
******
### Is this the same template as the SAS® toolkit? {#sas}
**Q:** This template looks similar to the template in
the SAS® Clinical Standards Toolkit. Are they the same?
**A:** No. The metadata template for the **defineR** package
was taken from the book "Implementing CDISC Using SAS: An End-to-End Guide"
by Chris Holland and Jack Shostak. This book was published by SAS Institute®,
but the metadata format is different than what was used for the
SAS® Clinical Standards Toolkit.
[top](#top)
******
<!--
### Question 2? {#validation}
**Q:** Question here.
**A:** Answer here.
[top](#top)
******
### Question 2? {#outputs}
**Q:** Question here.
**A:** Answer here.
[top](#top)
******
### Question 2? {#colors}
**Q:** Question here.
**A:** Answer here.
[top](#top)
******
-->
<!-- ### Question 2? {#q2} -->
<!-- **Q:** Question here. -->
<!-- **A:** Answer here. -->
<!-- [top](#top) -->
<!-- ****** -->
<!-- ### Question 1? {#q1} -->
<!-- **Q:** Question here. -->
<!-- **A:** Answer here. -->
<!-- [top](#top) -->
<!-- ****** -->