Skip to content

Commit

Permalink
Unified conversion of columns (cnvCol), and updated test cases; recti…
Browse files Browse the repository at this point in the history
…fied the bug in the unit test under r-devel
  • Loading branch information
sjentsch committed Nov 8, 2024
1 parent b650119 commit fb7a4a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/write_omv.R
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ jmvAtt <- function(dtaFrm = NULL, blnChC = FALSE) {
# (g) time - jamovi doesn't support it natively, thus the transformation to numeric; back-transformation in R - hms::as_hms(...)
} else if (is(dtaFrm[[i]], "difftime")) {
attr(dtaFrm[[i]], "measureType") <- "Continuous"
attr(dtaFrm[[i]], "dataType") <- "Decimal"
attr(dtaFrm[[i]], "dataType") <- "Integer"
if (blnChC) {
attr(dtaFrm[[i]], "description") <- paste(ifelse(chkAtt(dtaFrm[[i]], "description"), attr(dtaFrm[[i]], "description"), crrNme),
"(time converted to numeric; sec since 00:00)")
Expand Down Expand Up @@ -302,6 +302,9 @@ cnvCol <- function(crrCol = NULL, tgtTyp = "character") {
} else {
crrCol <- as(crrCol, tgtTyp)
}
if (length(dffAtt) > 0) crrCol <- setAtt(attLst = dffAtt, inpObj = crrAtt, outObj = as.data.frame(crrCol))[[1]]

crrCol
}

intFnC <- function(crrCol = NULL) {
Expand Down

0 comments on commit fb7a4a9

Please sign in to comment.