mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 05:07:30 +02:00
quick and working sollution to get variable suffixes in the tables. included in the easy_redcap() when widening
This commit is contained in:
parent
4ac9282c8f
commit
c52fd2947c
7 changed files with 102 additions and 26 deletions
|
|
@ -6,8 +6,8 @@
|
|||
\usage{
|
||||
redcap_wider(
|
||||
data,
|
||||
event.glue = "{.value}_{redcap_event_name}",
|
||||
inst.glue = "{.value}_{redcap_repeat_instance}"
|
||||
event.glue = "{.value}____{redcap_event_name}",
|
||||
inst.glue = "{.value}____{redcap_repeat_instance}"
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
|
|
|
|||
29
man/suffix2label.Rd
Normal file
29
man/suffix2label.Rd
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/redcap_wider.R
|
||||
\name{suffix2label}
|
||||
\alias{suffix2label}
|
||||
\title{Transfer variable name suffix to label in widened data}
|
||||
\usage{
|
||||
suffix2label(
|
||||
data,
|
||||
suffix.sep = "____",
|
||||
attr = "label",
|
||||
glue.str = "{label} ({paste(suffixes,collapse=', ')})"
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{data}{data.frame}
|
||||
|
||||
\item{suffix.sep}{string to split suffix(es). Passed to \link[base]{strsplit}}
|
||||
|
||||
\item{attr}{label attribute. Default is "label"}
|
||||
|
||||
\item{glue.str}{glue string for new label. Available variables are "label"
|
||||
and "suffixes"}
|
||||
}
|
||||
\value{
|
||||
data.frame
|
||||
}
|
||||
\description{
|
||||
Transfer variable name suffix to label in widened data
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue