multivariate

Convert data from multivariate (wide) to univariate (stacked/tall/long) form

Average: 5 (1 vote)

Our data in multivariate (wide) format:

my_data<- data.frame(
    id=c(1:50),
    depression1=rnorm(50),
    anxiety1=rnorm(50),
    depression2=rnorm(50),
    anxiety2=rnorm(50),
    depression3=rnorm(50),
    anxiety3=rnorm(50)
)
my_data

Read more after the jump.

Read more

Select time variables in a (multivariate/wide) data frame by name

No votes yet

This function will extract time labeled variables (or any variables with consistent naming) by name from a data frame in the order in which they appear in the data frame. This is especially useful in cases when one has a longitudinal or time-series data set where each row (subject) has many occasions of measurements for each measure. Code and examples after the jump.

Read more

Convert data from univariate (stacked/tall/long) to multivariate (wide) form

No votes yet

The function and documentation is listed after the jump.

Read more

Syndicate content