Learn R Programming

Rpdb (version 2.0)

basis: The Basis of an Object

Description

Functions to get or set the basis of an object containing atomic coordinates.

Usage

basis(x)
basis(x) <- value

## S3 method for class 'default': basis(x) ## S3 method for class 'default': basis(x) <- value

Arguments

x
an R object containing atomic coordinates.
value
a single element character vector use to set the basis of x.

Value

  • [object Object],[object Object]

Details

basis and basis<- are respectively generic accessor and replacement functions. The default methods get and set the basis attribute of an object containing atomic coordinates. This attribute indicate the type basis vector used to express atomic coordinates. value must be equal to "xyz", for Cartesian, or "abc", for fractional coordinates.

See Also

coords, atoms

Examples

Run this code
x <- coords(1:3, 4:6, 7:9, basis= "xyz")
basis(x)
basis(x) <- "abc"
basis(x)

Run the code above in your browser using DataLab