Skip to contents

This function reads in attributes available in an excel file and creates a structured list

Usage

attr_xls(xls, sepfor = "\n", nosort = FALSE)

Arguments

xls

character with the name of the excel file containing the attributes

sepfor

character of length 1 indicating what the separator for formats should be

nosort

logical indicating if sorting of variables should be omitted (otherwise sorting of no. column in excel file is applied)

Value

named list with the attributes

Author

Richard Hooijmaijers

Examples

xmpl  <- system.file("example/Attr.Template.xlsx",package = "amp.dm")
head(attr_xls(xmpl),3)
#> $STUDYID
#> $STUDYID$label
#> [1] "Study identifier"
#> 
#> $STUDYID$format
#> NULL
#> 
#> $STUDYID$remark
#> NULL
#> 
#> 
#> $ID
#> $ID$label
#> [1] "Unique subject identifier"
#> 
#> $ID$format
#> NULL
#> 
#> $ID$remark
#> NULL
#> 
#> 
#> $TRT
#> $TRT$label
#> [1] "Treatment arm"
#> 
#> $TRT$format
#>                      1                      2 
#> "300 mg theoph form 1" "300 mg theoph form 2" 
#> 
#> $TRT$remark
#> NULL
#> 
#>