aaa {evitaicossa}R Documentation

Function to create objects of class aaa

Description

Objects of class aaa

Usage

aaa(s1 = character(0), sc = numeric(0), d1 = character(0), d2 =
character(0), dc = numeric(0), t1 = character(0), t2 = character(0), t3
= character(0), tc = numeric(0))
lavter(cout)
as.aaa(s)
thing_to_aaa(L)

Arguments

s1, d1, d2, t1, t2, t3

single, double, triple symbols

sc, dc, tc

single, double, triple coefficients

L

A list with elements s1 etc

cout

list

s

Object that function as.aaa() will coerce to an aaa object

Details

Function lavter() is the formal creation method for aaa objects; it is the only place that new() is called. It takes a single argument cout, which is a list as returned by C function retval(). But it is a little awkward to use and the user should use other functions for creation, which are more user-friendly and have sensible defaults:

Value

Return objects of class aaa

Author(s)

Robin K. S. Hankin

Examples


aaa(s1 = "x", sc = 13)
aaa(d1 = "z", d2 = "w", dc = 14)
aaa(t1 = "x", t2 = "y", t3 = "z", tc = 15)

aaa(
    s1 = c("a","d"),
    sc = c( 4 , 2 ),
    d1 = c("a", "a", "a", "b"),
    d2 = c("a", "b", "d", "a"),
    dc = c( 3 ,  4 ,  4 ,  3 ),
    t1 = c("a", "a", "a", "b", "b"),
    t2 = c("c", "d", "d", "c", "c"),
    t3 = c("a", "c", "d", "a", "b"),
    tc = c(-4 , -1 , -4 , 11 , 20 )
)


aaa() # the zero object

aaa(s1=letters,sc=seq_along(letters))
aaa(d1=state.abb,d2=rev(state.abb),dc=seq_along(state.abb))

as.aaa(state.abb)


evita <- aaa(s1=letters[1:5],sc=1:5)
icossa <- aaa(d1=c("fish","chips"),d2=c("x","y"),dc=c(6,7))

evita
evita + icossa
evita * icossa
evita^2

f <- function(o){aaa(state.abb[o],seq_along(o))}
f(8:9) - (f(1:2) - f(6:8)^2)^2


[Package evitaicossa version 0.0-1 Index]