From d9feb0d0135776b6a9e152989cdfaa51e02c94f1 Mon Sep 17 00:00:00 2001 From: Sebastian Jentschke Date: Mon, 24 Jul 2023 19:12:57 +0200 Subject: [PATCH] Added attaching dataType and measureType attributes to a data frame when write_omv is called from jamovi --- R/write_omv.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/write_omv.R b/R/write_omv.R index 02ea004..ffcb276 100644 --- a/R/write_omv.R +++ b/R/write_omv.R @@ -54,7 +54,9 @@ write_omv <- function(dtaFrm = NULL, fleOut = "", retDbg = FALSE) { chkExt(fleOut, "omv") # check whether dtaFrm is a data frame + # attach dataType and measureType attributes when inside jamovi chkDtF(dtaFrm) + if (isJmv()) dtaFrm <- jmvAtt(dtaFrm) # handle the attributes "variable.labels" and "value.labels" in the format provided by the R-package "foreign" # the attribute "variable.labels" (attached to the data frame) is converted them to the format used by jamovi ("jmv-desc" attached to the data column)