Skip to content

Commit 168fb93

Browse files
committed
TODO placeholders for tidymodels/tidymodels#42
1 parent 3255172 commit 168fb93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

R/fit.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ check_interface <- function(formula, data, cl, model) {
342342
}
343343

344344
check_xy_interface <- function(x, y, cl, model) {
345+
# TODO Do we need a model spec attribute that is something like
346+
# 'allow_sparse' to make this conditional on that?
345347
inher(x, c("data.frame", "matrix", "dgCMatrix"), cl)
346348

347349
# `y` can be a vector (which is not a class), or a factor (which is not a vector)
@@ -358,6 +360,7 @@ check_xy_interface <- function(x, y, cl, model) {
358360
)
359361

360362
# Determine the `fit()` interface
363+
# TODO conditional here too?
361364
matrix_interface <- !is.null(x) & !is.null(y) && (is.matrix(x) | inherits(x, "dgCMatrix"))
362365
df_interface <- !is.null(x) & !is.null(y) && is.data.frame(x)
363366

0 commit comments

Comments
 (0)