Skip to content

Commit

Permalink
Update MCMCglmm.subsets.R
Browse files Browse the repository at this point in the history
  • Loading branch information
TGuillerme committed Dec 19, 2024
1 parent e90ecc9 commit 1e0ea3d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/MCMCglmm.subsets.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ MCMCglmm.subsets <- function(data, posteriors, group, tree, rename.groups, set.l
if(any(classifier)) {
group_classifier <- data[,which(!numerics)[which(classifier)], drop = FALSE]
}
if(ncol(group_classifier) == 0) {
stop("Could not find any classifier in the data in the format for MCMCglmm. Make sure a classifier is provided and in a factor format.")
}
} else {
cleaned_data <- data
group_classifier <- matrix(1, nrow = nrow(data), ncol = 1, dimnames = list(rownames(data)))
Expand Down

0 comments on commit 1e0ea3d

Please sign in to comment.