is.sparse.gdsn {gdsfmt} | R Documentation

## whether a sparse array or not

### Description

Determine whether the node is a sparse array or not.

### Usage

    is.sparse.gdsn(node)

### Arguments

`node` | an object of class `gdsn.class` (a GDS node)

### Value

TRUE / FALSE.

### Author(s)

Xiuwen Zheng

### References

http://github.com/zhengxwen/gdsfmt

### See Also

`add.gdsn`

### Examples

    # cteate a GDS file
    f <- createfn.gds("test.gds")

    cnt <- matrix(0, nrow=4, ncol=8)
    set.seed(100); cnt[sample.int(length(cnt), 8)] <- rpois(8, 4)
    cnt

    add.gdsn(f, "mat", val=cnt)
    add.gdsn(f, "sp.mat", val=cnt, storage="sp.real")
    f

    is.sparse.gdsn(index.gdsn(f, "mat"))
    is.sparse.gdsn(index.gdsn(f, "sp.mat"))

    # close the GDS file
    closefn.gds(f)

    # delete the temporary file
    unlink("test.gds", force=TRUE)

[Package gdsfmt version 1.30.0 Index]