Started from R-3.0.0, diag(x)
returns a numeric matrix with NA in the
diagonals when x is a character vector. Although this follows what the manual says, this
breaks the metaSEM. The Diag
has the same functions as
diag
except that Diag(x)
works for a character vector of
x by returning a square matrix of character "0" with x
as the
diagonals.