# straight

0th

Percentile

##### Draws straight lines.

The function draws lines in a given direction d through points x.

Keywords
multivariate
##### Usage
straight(x,...)
# S3 method for acomp
straight(x,d,...,steps=30,aspanel=FALSE)
# S3 method for rcomp
straight(x,d,...,steps=30,aspanel=FALSE)
# S3 method for aplus
straight(x,d,...,steps=30,aspanel=FALSE)
# S3 method for rplus
straight(x,d,...,steps=30,aspanel=FALSE)
# S3 method for rmult
straight(x,d,...,steps=30,aspanel=FALSE)
##### Arguments
x

dataset of points of the given type to draw the line through

d

dataset of directions of the line

further graphical parameters

steps

the number of discretisation points to draw the segments, since the representation might not visually be a straight line

aspanel

Logical, indicates use as slave to do acutal drawing only.

##### Details

The functions add lines to the graphics generated with the corresponding plot functions.

Adding to multipaneled plots redraws the plot completely, and is only possible when the plot has been created with the plotting routines from this library.

Lines end when they leave the space (e.g. the simplex), which sometimes leads to the impression of premature end (specially in rcomp geometry).

plot.acomp,lines.acomp

##### Aliases
• straight
• straight.rmult
• straight.acomp
• straight.rcomp
• straight.aplus
• straight.rplus
##### Examples
# NOT RUN {
data(SimulatedAmounts)

plot(acomp(sa.lognormals))
straight(mean(acomp(sa.lognormals)),
princomp(acomp(sa.lognormals))$Loadings[1,], col="red") straight(mean(rcomp(sa.lognormals)), princomp(rcomp(sa.lognormals))$loadings[,1],
col="blue")

plot(aplus(sa.lognormals[,1:2]))
straight(mean(aplus(sa.lognormals[,1:2])),
princomp(aplus(sa.lognormals[,1:2]))$Loadings[1,], col="red") straight(mean(rplus(sa.lognormals[,1:2])), princomp(rplus(sa.lognormals[,1:2]))$loadings[,1],
col="blue")

plot(rplus(sa.lognormals[,1:2]))
straight(mean(aplus(sa.lognormals[,1:2])),
princomp(aplus(sa.lognormals[,1:2]))$Loadings[1,], col="red") straight(mean(rplus(sa.lognormals[,1:2])), princomp(rplus(sa.lognormals[,1:2]))$loadings[,1],
col="blue")

# }

Documentation reproduced from package compositions, version 1.40-2, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.