Skip to content

Commit e073f5e

Browse files
committed
hard coerce
1 parent 940b4b9 commit e073f5e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

R/simdata.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,10 @@ simdata <- function(a, d, N, itemtype, sigma = NULL, mu = NULL, guess = 0,
418418
if(missing(itemtype)) missingMsg('itemtype')
419419
if(missing(d) && !all(itemtype == 'lca')) missingMsg('d')
420420
if(is.vector(a)) a <- matrix(a)
421+
a <- as.matrix(a)
421422
if(missing(d)) d <- matrix(1, nrow(a))
422423
if(is.vector(d)) d <- matrix(d)
424+
d <- as.matrix(d)
423425
stopifnot(is.matrix(d))
424426
if(any(itemtype == 'nominal') && is.null(nominal))
425427
stop('nominal itemtypes require a \'nominal\' matrix input of scoring coefficients (the ak values)',

0 commit comments

Comments
 (0)