File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,7 @@ ccdr_singleR <- function(cors,
442442
443443 # ## Check sigmas
444444 if (! is.numeric(sigmas )) stop(" sigmas must be numeric!" )
445+ if (length(sigmas ) != pp ) stop(sprintf(" sigmas must have length = %d!" , pp ))
445446 if (any(sigmas < 0 )){
446447 # -1 is a sentinel value for updating sigmas via the CD updates
447448 if (any(sigmas != - 1 . )){
@@ -454,7 +455,7 @@ ccdr_singleR <- function(cors,
454455 if (lambda < 0 ) stop(" lambda must be >= 0!" )
455456
456457 # ## Check weights
457- if (length(weights ) != pp * pp ) stop(" weights must have length p^2! " )
458+ if (length(weights ) != pp * pp ) stop(sprintf( " weights must have length p^2 = %d! " , pp * pp ) )
458459 if (! is.numeric(weights )) stop(" weights must be numeric!" )
459460 if (weights < - 1 || weights > 1 ) stop(" weights out of bounds!" )
460461
You can’t perform that action at this time.
0 commit comments