misc {frab}R Documentation

Miscellaneous functions

Description

This page documents various functions that work for frabs, and I will add to these from time to time as I add new functions that make sense for frab objects. To use functions like sin() and abs() on frab object x, work with values(x) (which is a disord object). However, there are a few functions that are a little more involved:

Usage

## S4 method for signature 'frab'
length(x)

Arguments

x

Object of class frab

Value

Generally return frabs

Note

Constructions such as !is.na(x) do not work if x is a frab object: this is because is.na() returns a disind object, not a logical. Use is.notna() to identify elements that are not NA.

Author(s)

Robin K. S. Hankin

See Also

extract

Examples



(a <- frab(c(a=1,b=NA,c=44,x=NA,h=4)))
is.na(a)

(x <- frab(c(x=5,y=2,z=3,a=7,b=6)))
which(x>3)
x[which(x>3)]
x[which(x>3)] <- 4
x

is.na(x) <- x<3
x
x[is.na(x)] <- 100
x

y <- frab(c(a=5,b=NA,c=3,d=NA))
y[is.notna(y)] <- 199
y

[Package frab version 0.0-3 Index]