Learn R Programming

cry (version 0.5.2)

check_cryst_symm_validity: Validity and compatibility of a cry object of class 'cryst_symm'

Description

An object of class 'cryst_symm' is a named list of length 4. The first field is a character string, the second field is a \(3\times 3\) array and the third and fourth field are \(3 \times 1\) arrays.

Usage

check_cryst_symm_validity(x, message = FALSE)

Value

ans A logical value. TRUE means that the input is a valid object of class'cryst_symm'.

Arguments

x

Object of class 'cryst_symm'.

message

A logical variable. If TRUE, the function prints a message on the errors, if any (default is FALSE, i.e. no message printed).

Examples

Run this code
# Create an object of class 'cryst_symm'
x <- cryst_symm(15)

# Check its validity
check_cryst_symm_validity(x)

# Now change a field
x$PG[[1]] <- matrix(rep(0,times=9),ncol=3)

# Check validity again
check_cryst_symm_validity(x,TRUE)

Run the code above in your browser using DataLab