Last chance! 50% off unlimited learning
Sale ends in
check.data
is used to check whether the data are of required
format.
check.data(X, format = c("probability.different", "percent.same", "general"))
NA
, NaN
, Inf
, or -Inf
values are allowed."probability.different"
,
"percent.same"
, or "general"
, with default
"probability.different"
, and may be abbreviated to a unique
prefix.check.data
returns a
matrix of the data with rows and columns labeled.The labeling is as follows.
Dzhafarov, E. N. and Colonius, H. (2007) Dissimilarity cumulation theory and subjective metrics. Journal of Mathematical Psychology, 51, 290--304.
Uenlue, A. and Kiefer, T. and Dzhafarov, E. N. (2009) Fechnerian scaling in R: The package fechner. Journal of Statistical Software, 31(6), 1--24. URL http://www.jstatsoft.org/v31/i06/.
check.regular
for checking regular
minimality/maximality; fechner
, the main function for
Fechnerian scaling. See also fechner-package
for
general information about this package.
## dataset \link{wish} is of probability-different format
check.data(wish)
## dataset \link{morse} is of percent-same format
check.data(morse, format = "percent.same")
## a matrix without any labeling of rows and columns, of general format
## check.data does the labeling automatically
(X <- ((-1) * matrix(1:16, nrow = 4)))
check.data(X, format = "general")
## examples of data that are not of any of the three formats
## message: data must be matrix or data frame
check.data(as.character(matrix(1:16, nrow = 4)))
## message: data must have same number of rows and columns
check.data(matrix(1:12, nrow = 4))
## message: data must be numbers
check.data(matrix(LETTERS[1:16], nrow = 4))
Run the code above in your browser using DataLab