public void InsertColumn <T>(string variableName, int columnIndex) { if (IsFiltered) { throw new InvalidOperationException("InsertColumn not possible while data is filtered"); } originalData.InsertColumn <T>(variableName, columnIndex); }
private void RenameTransformedColumsAndRestorePreservedColumns(IList <Transformation <double> > transformations) { foreach (var column in originalColumns) { int originalColumnIndex = preprocessingData.GetColumnIndex(column.Key); int newColumnIndex = originalColumnIndex + 1; string newColumnName = GetTransformatedColumnName(transformations, column.Key); // save renaming mapping renamedColumns[column.Key] = newColumnName; // create new transformed column preprocessingData.InsertColumn <double>(newColumnName, newColumnIndex); preprocessingData.SetValues(newColumnIndex, preprocessingData.GetValues <double>(originalColumnIndex)); // restore old values preprocessingData.SetValues(originalColumnIndex, column.Value); } }