getscale: Get subscales from a dataframe or matrix and a reference...

View source: R/getscale.R

getscaleR Documentation

Get subscales from a dataframe or matrix and a reference spreedsheet from excel

Usage

getscale(df, file,sheet=1,  column)

Arguments

df

Data frame or matrix

file

excel file (e.g "example.xlsx")

column

Column name (or number) for scale in excel (e.g "Subscale")

sheet

sheet number default 1

Author(s)

Ariadna Angulo-Brunet (ariadna.angulo@uab.cat), Carme Viladrich

Examples

#reference is an excel sheet with a colum "VariablesInput" which contains variable names of the data frame
getscale(df, "reference.xlsx", column="Subscales")
a<-unlist(output)
a<-data.frame((vapply(output,unlist,unlist(output[[1]]))))

for(i in 1:ncol(a)){
  assign(names(output)[i], a[[i]])
#remove innecessary objects
#rm(a,i, output)
}

AnguloB/SubscaleExplorer documentation built on Feb. 23, 2025, 1:05 a.m.