Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data entry redux #475

Merged
merged 4 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions R/auditCommonFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -296,18 +296,12 @@
sampleFilter <- numeric(selectionState[["N.items"]])
rowNumber <- as.numeric(sample[["row"]])
sampleFilter[rowNumber] <- as.numeric(sample[["times"]])
auditDataVariable <- rep(NA, selectionState[["N.items"]])
auditDataVariable[options[["performAudit"]][[1]]$rowIndices] <- options[["performAudit"]][[1]]$values


if (is.null(jaspResults[["indicator_col"]])) {
jaspResults[["indicator_col"]] <- createJaspColumn(columnName = options[["indicator_col"]], dependencies = "indicator_col")
}
if (is.null(jaspResults[["variable_col"]])) {
jaspResults[["variable_col"]] <- createJaspColumn(columnName = options[["variable_col"]], dependencies = "variable_col")
}

jaspResults[["indicator_col"]]$setOrdinal(sampleFilter)
jaspResults[["variable_col"]]$setScale(auditDataVariable)
}
}

Expand Down
8 changes: 6 additions & 2 deletions inst/qml/auditBayesianWorkflow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,12 @@ Form
pasteVariables.checked = true
performAuditTable.colName = names.variable_name
performAuditTable.extraCol = names.indicator_name
values.count > 0 && critical.use_negative && critical.use_inspect ? performAuditTable.filter = names.indicator_name + " > 0" + " | " + critical.use_name + " > 0" : performAuditTable.filter = names.indicator_name + " > 0"

if(values.count > 0 && critical.use_negative && critical.use_inspect)
performAuditTable.filter = names.indicator_name + " > 0" + " | " + critical.use_name + " > 0"
else
performAuditTable.filter = names.indicator_name + " > 0"

performAuditTable.initialValuesSource = annotation.use_values ? "values" : ""
}
}
Expand Down Expand Up @@ -315,7 +320,6 @@ Form
Layout.fillWidth: true
modelType: JASP.FilteredDataEntryModel
source: ["id", "values", "variables"]
colName: "Filter"
defaultValue: 0
decimals: 10
Layout.preferredHeight: 500 * preferencesModel.uiScale
Expand Down
8 changes: 6 additions & 2 deletions inst/qml/auditClassicalWorkflow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,12 @@ Form
pasteVariables.checked = true
performAuditTable.colName = names.variable_name
performAuditTable.extraCol = names.indicator_name
values.count > 0 && critical.use_negative && critical.use_inspect ? performAuditTable.filter = names.indicator_name + " > 0" + " | " + critical.use_name + " > 0" : performAuditTable.filter = names.indicator_name + " > 0"

if(values.count > 0 && critical.use_negative && critical.use_inspect)
performAuditTable.filter = names.indicator_name + " > 0" + " | " + critical.use_name + " > 0"
else
performAuditTable.filter = names.indicator_name + " > 0"

performAuditTable.initialValuesSource = annotation.use_values ? "values" : ""
}
}
Expand Down Expand Up @@ -306,7 +311,6 @@ Form
Layout.fillWidth: true
modelType: JASP.FilteredDataEntryModel
source: ["id", "values", "variables"]
colName: "Filter"
defaultValue: 0
decimals: 10
Layout.preferredHeight: 500 * preferencesModel.uiScale
Expand Down
3 changes: 2 additions & 1 deletion inst/qml/common/evaluation/AddVariables.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ Group
value: qsTr("selected")
}

ComputedColumnField
CheckColumnIsFreeOrMineField
{
id: variable_col
name: "variable_col"
text: qsTr("Column name audit result")
fieldWidth: 120 * preferencesModel.uiScale
value: qsTr("auditResult")

}
}
Loading