Skip to content

Conversation

JorisGoosen
Copy link
Contributor

@JorisGoosen
Copy link
Contributor Author

@vandenman ?

I guess the function won't be available in JASP anyway until @RensDofferhoff makes new bundles.
I dont think there was a hurry for it or anything though

Comment on lines +48 to +49
dataset <- .getInternal("dataset")
dataset <- loadCorrectDataset(dataset)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this also do the remainder of

jaspTools/R/dataset.R

Lines 58 to 82 in 8a5cf99

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))
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)

Perhaps wrap it in a function to use in both places?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose?

Anyway, my vacation has started, and I wont really have time to look at this until beginning of august

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants