about_short

Installation

library(dmtools)

Overview

The short() can be useful for validation, if you need to transform the dataset and create one column for a variable with different events. You also need to create the excel document, where the name and number of columns can be any. If you have common columns, pass them to a parameter common_cols of short(). Notice, don’t write common columns in the excel document. If you have the extra information e.g. the understandable name of an analysis, pass it to a parameter extra.

Usage

Some examples, where you can use short().

pregnancy test

preg
yn res
preg_yn preg_res
dataset
id site sex preg_yn_e2 preg_res_e2 preg_yn_e3 preg_res_e3
01 site 01 f y neg y neg
02 site 02 m y neg y pos
03 site 03 f y neg n unnes

drug type

drug
type amount
drug_type drug_amount
dataset
id drug_type_e2 drug_amount_e2 drug_type_e3 drug_amount_e3
01 type_one 2 type_one 2
02 type_two 1 type_two 1
03 type_one 2 type_one 1

vital functions

vf
heart resp
hr respr
dataset
id hr_e2 respr_e2 hr_e3 respr_e3
01 60 12 65 13
02 70 15 71 14
03 76 16 86 18

adverse events

ae
lab is_norm cl human_name
ast ast_norm ast_cl enzyme_ast
dataset
id ast_e2 ast_norm_e2 ast_cl_e2 ast_e3 ast_norm_e3 ast_cl_e3 ae_yn_e5 ae_desc_e5
01 32 norm NA 36 norm NA no NA
02 56 no no 80 no yes yes abnormal ast
03 60 no yes 32 norm NA no NA