diff --git a/instat/dlgName.Designer.vb b/instat/dlgName.Designer.vb index 343d0eee9b..cf7070ee6c 100644 --- a/instat/dlgName.Designer.vb +++ b/instat/dlgName.Designer.vb @@ -71,6 +71,9 @@ Partial Class dlgName Me.ucrPnlOptions = New instat.UcrPanel() Me.ucrReceiverColumns = New instat.ucrReceiverMultiple() Me.ucrPnlSelectData = New instat.UcrPanel() + Me.rdoLabels = New System.Windows.Forms.RadioButton() + Me.cmdAddkeyboard = New System.Windows.Forms.Button() + Me.ucrChkIncludeRegularExpressions = New instat.ucrCheck() Me.grpOptions.SuspendLayout() Me.SuspendLayout() ' @@ -109,7 +112,7 @@ Partial Class dlgName Me.rdoMultiple.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoMultiple.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoMultiple.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoMultiple.Location = New System.Drawing.Point(218, 10) + Me.rdoMultiple.Location = New System.Drawing.Point(178, 10) Me.rdoMultiple.Name = "rdoMultiple" Me.rdoMultiple.Size = New System.Drawing.Size(110, 28) Me.rdoMultiple.TabIndex = 2 @@ -128,7 +131,7 @@ Partial Class dlgName Me.rdoSingle.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoSingle.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoSingle.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoSingle.Location = New System.Drawing.Point(108, 10) + Me.rdoSingle.Location = New System.Drawing.Point(70, 10) Me.rdoSingle.Name = "rdoSingle" Me.rdoSingle.Size = New System.Drawing.Size(110, 28) Me.rdoSingle.TabIndex = 1 @@ -312,7 +315,7 @@ Partial Class dlgName Me.rdoRenameWith.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoRenameWith.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.rdoRenameWith.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.rdoRenameWith.Location = New System.Drawing.Point(328, 10) + Me.rdoRenameWith.Location = New System.Drawing.Point(286, 10) Me.rdoRenameWith.Name = "rdoRenameWith" Me.rdoRenameWith.Size = New System.Drawing.Size(110, 28) Me.rdoRenameWith.TabIndex = 13 @@ -429,9 +432,9 @@ Partial Class dlgName 'ucrPnlOptions ' Me.ucrPnlOptions.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.ucrPnlOptions.Location = New System.Drawing.Point(97, 2) + Me.ucrPnlOptions.Location = New System.Drawing.Point(62, 2) Me.ucrPnlOptions.Name = "ucrPnlOptions" - Me.ucrPnlOptions.Size = New System.Drawing.Size(355, 44) + Me.ucrPnlOptions.Size = New System.Drawing.Size(448, 44) Me.ucrPnlOptions.TabIndex = 0 ' 'ucrReceiverColumns @@ -455,12 +458,50 @@ Partial Class dlgName Me.ucrPnlSelectData.Size = New System.Drawing.Size(315, 51) Me.ucrPnlSelectData.TabIndex = 19 ' + 'rdoLabels + ' + Me.rdoLabels.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoLabels.BackColor = System.Drawing.SystemColors.Control + Me.rdoLabels.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoLabels.FlatAppearance.BorderSize = 2 + Me.rdoLabels.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoLabels.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoLabels.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoLabels.Location = New System.Drawing.Point(394, 10) + Me.rdoLabels.Name = "rdoLabels" + Me.rdoLabels.Size = New System.Drawing.Size(110, 28) + Me.rdoLabels.TabIndex = 22 + Me.rdoLabels.TabStop = True + Me.rdoLabels.Tag = "" + Me.rdoLabels.Text = "Labels With" + Me.rdoLabels.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoLabels.UseVisualStyleBackColor = False + ' + 'cmdAddkeyboard + ' + Me.cmdAddkeyboard.Location = New System.Drawing.Point(315, 315) + Me.cmdAddkeyboard.Name = "cmdAddkeyboard" + Me.cmdAddkeyboard.Size = New System.Drawing.Size(100, 23) + Me.cmdAddkeyboard.TabIndex = 35 + Me.cmdAddkeyboard.Text = "Add Keyboard" + Me.cmdAddkeyboard.UseVisualStyleBackColor = True + ' + 'ucrChkIncludeRegularExpressions + ' + Me.ucrChkIncludeRegularExpressions.AutoSize = True + Me.ucrChkIncludeRegularExpressions.Checked = False + Me.ucrChkIncludeRegularExpressions.Location = New System.Drawing.Point(71, 316) + Me.ucrChkIncludeRegularExpressions.Name = "ucrChkIncludeRegularExpressions" + Me.ucrChkIncludeRegularExpressions.Size = New System.Drawing.Size(239, 23) + Me.ucrChkIncludeRegularExpressions.TabIndex = 34 + ' 'dlgName ' Me.AutoScaleDimensions = New System.Drawing.SizeF(96.0!, 96.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi Me.AutoSize = True Me.ClientSize = New System.Drawing.Size(545, 540) + Me.Controls.Add(Me.rdoLabels) Me.Controls.Add(Me.grdRenameColumns) Me.Controls.Add(Me.ucrChkIncludeVariable) Me.Controls.Add(Me.rdoRenameWith) @@ -481,6 +522,8 @@ Partial Class dlgName Me.Controls.Add(Me.rdoSelectedColumn) Me.Controls.Add(Me.rdoWholeDataFrame) Me.Controls.Add(Me.ucrPnlSelectData) + Me.Controls.Add(Me.cmdAddkeyboard) + Me.Controls.Add(Me.ucrChkIncludeRegularExpressions) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False @@ -527,4 +570,7 @@ Partial Class dlgName Friend WithEvents rdoSelectedColumn As RadioButton Friend WithEvents rdoWholeDataFrame As RadioButton Friend WithEvents ucrPnlSelectData As UcrPanel + Friend WithEvents rdoLabels As RadioButton + Friend WithEvents cmdAddkeyboard As Button + Friend WithEvents ucrChkIncludeRegularExpressions As ucrCheck End Class diff --git a/instat/dlgName.vb b/instat/dlgName.vb index b108de0f7e..0be8141d4a 100644 --- a/instat/dlgName.vb +++ b/instat/dlgName.vb @@ -30,7 +30,8 @@ Public Class dlgName Private clsNewColNameDataframeFunction As New RFunction Private clsNewLabelDataframeFunction As New RFunction Private clsDummyFunction As New RFunction - Private clsStartwithFunction, clsEndswithFunction, clsMatchesFunction, clsContainsFunction As New RFunction + Private clsFixedFunction As New RFunction + Private clsStartwithFunction, clsRegexFunction, clsEndswithFunction, clsMatchesFunction, clsContainsFunction As New RFunction Private WithEvents grdCurrentWorkSheet As Worksheet Private dctRowsNewNameChanged As New Dictionary(Of Integer, String) Private dctRowsNewLabelChanged As New Dictionary(Of Integer, String) @@ -80,10 +81,14 @@ Public Class dlgName ucrInputVariableLabel.SetParameter(New RParameter("label", 3)) ucrPnlOptions.SetParameter(New RParameter("type", 4)) - ucrPnlOptions.AddRadioButton(rdoSingle, Chr(34) & "single" & Chr(34)) - ucrPnlOptions.AddRadioButton(rdoMultiple, Chr(34) & "multiple" & Chr(34)) - ucrPnlOptions.AddRadioButton(rdoRenameWith, Chr(34) & "rename_with" & Chr(34)) - ucrPnlOptions.SetRDefault(Chr(34) & "single" & Chr(34)) + ucrPnlOptions.AddRadioButton(rdoSingle) + ucrPnlOptions.AddRadioButton(rdoMultiple) + ucrPnlOptions.AddRadioButton(rdoRenameWith) + ucrPnlOptions.AddRadioButton(rdoLabels) + ucrPnlOptions.AddParameterValuesCondition(rdoSingle, "name", "single") + ucrPnlOptions.AddParameterValuesCondition(rdoMultiple, "name", "multiple") + ucrPnlOptions.AddParameterValuesCondition(rdoRenameWith, "name", "rename") + ucrPnlOptions.AddParameterValuesCondition(rdoLabels, "name", "labels") ucrNudAbbreviate.SetParameter(New RParameter("minlength", 10)) ucrNudAbbreviate.SetMinMax(Integer.MinValue, Integer.MaxValue) @@ -131,6 +136,8 @@ Public Class dlgName dctReplace.Add("Ends With", Chr(34) & "ends_with" & Chr(34)) dctReplace.Add("Matches", Chr(34) & "matches" & Chr(34)) dctReplace.Add("Contains", Chr(34) & "contains" & Chr(34)) + dctReplace.Add("Matches All", Chr(34) & "contains" & Chr(34)) + dctReplace.Add("Contains All", Chr(34) & "contains" & Chr(34)) ucrInputEdit.SetDropDownStyleAsNonEditable() ucrInputEdit.SetItems(dctReplace) @@ -140,9 +147,14 @@ Public Class dlgName ucrInputReplace.SetParameter(New RParameter("pattern", 2)) ucrInputReplace.SetLinkedDisplayControl(lblReplace) + ucrChkIncludeRegularExpressions.SetText("Include Regular Expressions") + + ucrChkIncludeRegularExpressions.SetParameter(New RParameter("check", 0)) + ucrChkIncludeRegularExpressions.SetValuesCheckedAndUnchecked(True, False) + ucrPnlOptions.AddToLinkedControls({ucrReceiverName, ucrInputNewName, ucrInputVariableLabel}, {rdoSingle}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls(ucrChkIncludeVariable, {rdoMultiple}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOptions.AddToLinkedControls({ucrPnlCase, ucrPnlSelectData}, {rdoRenameWith}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrPnlCase, ucrPnlSelectData}, {rdoRenameWith, rdoLabels}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlCase.AddToLinkedControls(ucrInputCase, {rdoMakeCleanNames}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="Snake") ucrPnlCase.AddToLinkedControls(ucrNudAbbreviate, {rdoAbbreviate}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="8") ucrPnlCase.AddToLinkedControls(ucrInputReplace, {rdoReplace}, bNewLinkedHideIfParameterMissing:=True) @@ -171,6 +183,8 @@ Public Class dlgName clsEndswithFunction = New RFunction clsMatchesFunction = New RFunction clsContainsFunction = New RFunction + clsRegexFunction = New RFunction + clsFixedFunction = New RFunction ucrSelectVariables.Reset() dctRowsNewNameChanged.Clear() @@ -182,6 +196,8 @@ Public Class dlgName clsDummyFunction.AddParameter("checked", "FALSE", iPosition:=0) clsDummyFunction.AddParameter("checked", "whole", iPosition:=1) + clsDummyFunction.AddParameter("name", "single", iPosition:=2) + clsDummyFunction.AddParameter("check", False, iPosition:=3) clsDefaultRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$rename_column_in_data") clsDefaultRFunction.AddParameter("type", Chr(34) & "single" & Chr(34), iPosition:=4) @@ -205,6 +221,15 @@ Public Class dlgName clsStartwithFunction.SetRCommand("starts_with") clsStartwithFunction.AddParameter("match", Chr(34) & ucrInputReplace.GetText & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + clsFixedFunction.SetPackageName("stringr") + clsFixedFunction.SetRCommand("fixed") + + clsRegexFunction.SetPackageName("stringr") + clsRegexFunction.SetRCommand("regex") + clsRegexFunction.AddParameter("ignore_case", "FALSE", bIncludeArgumentName:=False, iPosition:=3) + clsRegexFunction.AddParameter("multiline", "FALSE", iPosition:=4) + clsRegexFunction.AddParameter("comments", "FALSE", iPosition:=5) + ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) End Sub @@ -218,16 +243,17 @@ Public Class dlgName ucrReceiverName.SetRCode(clsDefaultRFunction, bReset) ucrInputNewName.SetRCode(clsDefaultRFunction, bReset) ucrInputVariableLabel.SetRCode(clsDefaultRFunction, bReset) + ucrChkIncludeRegularExpressions.SetRCode(clsDummyFunction, bReset) If bReset Then ucrPnlCase.SetRCode(clsDefaultRFunction, bReset) ucrInputReplace.SetRCode(clsDefaultRFunction, bReset) ucrChkIncludeVariable.SetRCode(clsDummyFunction, bReset) + ucrPnlSelectData.SetRCode(clsDummyFunction, bReset) + ucrPnlOptions.SetRCode(clsDummyFunction, bReset) End If ucrInputCase.SetRCode(clsDefaultRFunction, bReset) ucrNudAbbreviate.SetRCode(clsDefaultRFunction, bReset) - ucrPnlOptions.SetRCode(clsDefaultRFunction, bReset) ucrInputBy.SetRCode(clsDefaultRFunction, bReset) - ucrPnlSelectData.SetRCode(clsDummyFunction, bReset) End Sub Private Sub TestOKEnabled() @@ -569,7 +595,7 @@ Public Class dlgName Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged, ucrPnlCase.ControlValueChanged, ucrPnlSelectData.ControlValueChanged, ucrInputCase.ControlValueChanged, ucrNudAbbreviate.ControlValueChanged, ucrReceiverColumns.ControlValueChanged If rdoSingle.Checked Then ucrReceiverName.SetMeAsReceiver() - ElseIf rdoRenameWith.Checked Then + ElseIf rdoRenameWith.Checked OrElse rdoLabels.Checked Then ucrInputBy.Visible = rdoWholeDataFrame.Checked AndAlso rdoReplace.Checked ucrInputEdit.Visible = ucrInputBy.Visible ucrInputReplace.Visible = ucrInputBy.Visible @@ -583,13 +609,20 @@ Public Class dlgName End If End If End If - ucrSelectVariables.lstAvailableVariable.Visible = rdoSingle.Checked OrElse (rdoRenameWith.Checked AndAlso rdoSelectedColumn.Checked) + + ucrSelectVariables.lstAvailableVariable.Visible = rdoSingle.Checked OrElse + (rdoRenameWith.Checked AndAlso rdoSelectedColumn.Checked) OrElse + (rdoLabels.Checked AndAlso rdoSelectedColumn.Checked) + ucrSelectVariables.btnAdd.Visible = ucrSelectVariables.lstAvailableVariable.Visible ucrSelectVariables.btnDataOptions.Visible = ucrSelectVariables.lstAvailableVariable.Visible UpdateGrid() RemoveParameters() DialogueSize() RemovePattern() + ConfigureTypeParameter() + ConfigurePatternParameter() + SetRegexControlVisibility() End Sub Private Sub DialogueSize() @@ -627,10 +660,6 @@ Public Class dlgName MakeLabelColumnVisible() End Sub - Private Sub cmdAddkeyboard_Click(sender As Object, e As EventArgs) - sdgConstructRegexExpression.ShowDialog() - End Sub - Private Sub ucrSelectVariables_DataFrameChanged() Handles ucrSelectVariables.DataFrameChanged RemoveLabelsParams() UpdateGrid() @@ -660,25 +689,31 @@ Public Class dlgName Private Sub RemovePattern() If rdoWholeDataFrame.Checked Then - If rdoRenameWith.Checked AndAlso rdoReplace.Checked Then - clsDefaultRFunction.AddParameter("type", Chr(34) & "rename_with" & Chr(34), iPosition:=1) - clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace", iPosition:=2) - clsDefaultRFunction.AddParameter("pattern", Chr(34) & ucrInputReplace.GetText() & Chr(34), iPosition:=4) + If (rdoRenameWith.Checked OrElse rdoLabels.Checked) AndAlso rdoReplace.Checked Then clsDefaultRFunction.RemoveParameterByName("label") clsDefaultRFunction.AddParameter("replacement", Chr(34) & ucrInputBy.GetText() & Chr(34), iPosition:=5) Select Case ucrInputEdit.GetText Case "Starts With" clsDefaultRFunction.AddParameter(".cols", clsRFunctionParameter:=clsStartwithFunction, iPosition:=3) + clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace", iPosition:=2) Case "Ends With" clsDefaultRFunction.AddParameter(".cols", clsRFunctionParameter:=clsEndswithFunction, iPosition:=3) + clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace", iPosition:=2) Case "Matches" clsDefaultRFunction.AddParameter(".cols", clsRFunctionParameter:=clsMatchesFunction, iPosition:=3) + clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace", iPosition:=2) Case "Contains" clsDefaultRFunction.AddParameter(".cols", clsRFunctionParameter:=clsContainsFunction, iPosition:=3) + clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace", iPosition:=2) + Case "Matches All" + clsDefaultRFunction.AddParameter(".cols", clsRFunctionParameter:=clsMatchesFunction, iPosition:=3) + clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace_all", iPosition:=2) + Case "Contains All" + clsDefaultRFunction.AddParameter(".cols", clsRFunctionParameter:=clsContainsFunction, iPosition:=3) + clsDefaultRFunction.AddParameter(".fn", "stringr::str_replace_all", iPosition:=2) End Select Else - clsDefaultRFunction.RemoveParameterByName("pattern") clsDefaultRFunction.RemoveParameterByName("replacement") clsDefaultRFunction.RemoveParameterByName(".cols") End If @@ -687,7 +722,72 @@ Public Class dlgName End If End Sub + Private Sub ConfigurePatternParameter() + If rdoWholeDataFrame.Checked AndAlso (rdoRenameWith.Checked OrElse rdoLabels.Checked) AndAlso rdoReplace.Checked Then + Dim patternValue As String = Chr(34) & ucrInputReplace.GetText & Chr(34) + If ucrChkIncludeRegularExpressions.Checked AndAlso (ucrInputEdit.GetText = "Matches All" OrElse ucrInputEdit.GetText = "Matches") Then + + clsRegexFunction.AddParameter("pattern", patternValue, bIncludeArgumentName:=False, iPosition:=1) + clsDefaultRFunction.AddParameter("pattern", clsRFunctionParameter:=clsRegexFunction, bIncludeArgumentName:=False, iPosition:=4) + Else + Select Case ucrInputEdit.GetText + Case "Contains", "Contains All" + clsFixedFunction.AddParameter("pattern", patternValue, bIncludeArgumentName:=False, iPosition:=1) + clsDefaultRFunction.AddParameter("pattern", clsRFunctionParameter:=clsFixedFunction, bIncludeArgumentName:=False, iPosition:=4) + Case Else + clsDefaultRFunction.AddParameter("pattern", patternValue, iPosition:=4) + End Select + End If + Else + clsDefaultRFunction.RemoveParameterByName("pattern") + End If + End Sub + + Private Sub ConfigureTypeParameter() + If rdoLabels.Checked Then + clsDefaultRFunction.AddParameter("type", Chr(34) & "rename_labels" & Chr(34), iPosition:=1) + + ElseIf rdoRenameWith.Checked Then + clsDefaultRFunction.AddParameter("type", Chr(34) & "rename_with" & Chr(34), iPosition:=1) + + ElseIf rdoMultiple.Checked Then + clsDefaultRFunction.AddParameter("type", Chr(34) & "multiple" & Chr(34), iPosition:=1) + + ElseIf rdoSingle.Checked Then + + clsDefaultRFunction.AddParameter("type", Chr(34) & "single" & Chr(34), iPosition:=1) + End If + End Sub + Private Sub ucrInputEdit_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputEdit.ControlValueChanged, ucrInputBy.ControlValueChanged, ucrInputReplace.ControlValueChanged RemovePattern() + ConfigureTypeParameter() + ConfigurePatternParameter() + SetRegexControlVisibility() + End Sub + + Private Sub cmdAddkeyboard_Click(sender As Object, e As EventArgs) Handles cmdAddkeyboard.Click + sdgConstructRegexExpression.ShowDialog() + ucrInputReplace.SetName(sdgConstructRegexExpression.ucrReceiverForRegex.GetText()) + End Sub + + Private Sub ucrChkIncludeRegularExpressions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkIncludeRegularExpressions.ControlValueChanged + RemovePattern() + ConfigurePatternParameter() + SetRegexControlVisibility() + End Sub + + Private Sub SetRegexControlVisibility() + ucrChkIncludeRegularExpressions.Visible = False + cmdAddkeyboard.Visible = False + + If rdoWholeDataFrame.Checked AndAlso + (rdoRenameWith.Checked OrElse rdoLabels.Checked) AndAlso + rdoReplace.Checked AndAlso + (ucrInputEdit.GetText = "Matches All" OrElse ucrInputEdit.GetText = "Matches") Then + + ucrChkIncludeRegularExpressions.Visible = True + cmdAddkeyboard.Visible = ucrChkIncludeRegularExpressions.Checked + End If End Sub End Class diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index be37377a70..2ef35f8ac2 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -1011,6 +1011,29 @@ DataSheet$set("public", "rename_column_in_data", function(curr_col_name = "", ne self$data_changed <- TRUE self$variables_metadata_changed <- TRUE } + } else if (type == "rename_labels"){ + # to rename column labels. Here, instead of renaming a column name, we're giving new values in a column. + curr_metadata <- self$get_variables_metadata() + curr_col_names <- names(curr_data %>% dplyr::select(.cols)) + + # create a new data frame containing the changes - but only apply to those that we actually plan to change for efficiency. + new_metadata <- curr_metadata |> + dplyr::filter(Name %in% curr_col_names) %>% + dplyr::mutate( + dplyr::across( + label, + ~ .fn(., ...) + ) + ) + + if(self$column_selection_applied()) self$remove_current_column_selection() + # apply the changes + new_label_names <- new_metadata[!("Name" %in% curr_col_names)]$label + for (i in seq_along(new_label_names)) { + self$append_to_variables_metadata(curr_col_names[i], property = "label", new_val = new_label_names[i]) + } + self$data_changed <- TRUE + self$variables_metadata_changed <- TRUE } })