Skip to content

Commit

Permalink
Fix for empty column names (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
vandenman authored Oct 9, 2024
1 parent b25e6c0 commit 15aefc3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions R/dataset.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ findAllColumnNamesInOptions <- function(options, allColumnNames) {
preloadDataset <- function(datasetPathOrObject, options) {

dataset <- loadCorrectDataset(datasetPathOrObject)

# repair any names like "", which cause false positives in findAllColumnNamesAndTypes
# because empty options are often ""
cnms <- colnames(dataset)
if (any(cnms == "")) {

bad <- which(cnms == "")
newCnms <- make.names(cnms)
cnms[bad] <- newCnms[bad]
colnames(dataset) <- cnms

}
# columns <- findAllColumnNamesInOptions(options, colnames(dataset))
temp <- findAllColumnNamesAndTypes(options, colnames(dataset))

Expand Down

0 comments on commit 15aefc3

Please sign in to comment.