Skip to content

Commit

Permalink
remove duplicated variables with preloadData
Browse files Browse the repository at this point in the history
  • Loading branch information
vandenman authored Nov 6, 2024
1 parent eb0224a commit c4eda75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ preloadDataset <- function(datasetPathOrObject, options) {
variables <- temp[["variables"]]
types <- temp[["types"]]

# remove any duplicated variables for now
nonDuplicatedIdx <- !duplicated(variables)
variables <- variables[nonDuplicatedIdx]
types <- types[nonDuplicatedIdx]

dataset <- convertToTypes(dataset[variables], types, datasetPathOrObject)

.setInternal("preloadedDataset", dataset)
Expand Down

0 comments on commit c4eda75

Please sign in to comment.