Implements some R Commands in Euler (very incompletely).

This is not meant to be an R environment. It just steals some functions from R, which I consider useful for Euler for users coming from R.

Some elements contradict the Euler philosophy. E.g., the function c() might easily confuse with variables c, or T,F for true and false might be better used for other variables. Other functions would overwrite Euler functions and destroy the functionality of Euler. These functions have been renamed. E.g., plot is called rplot.

Load this with "load r". Help with "help r.e".

T:=1; F:=0;

functionc()

Make a vector from the elements of the arguments. The arguments can be scalars, vectors or matrices. Matrices are reformed to a vector. So just all elements of the matrices are added.

functionrep(v,n)

Repeat the vector v n times n : If it is a number the vector n is repeated n times. If it is a vector it must match the size of v, and the elements of v are repeated as often as the correspoding element of n says.

functionseq(a, b, by=1, length:positive integer=none)

Make a sequence with step size by or total length. by : an optional step size length : if this is specified the vector will contain n=length equispaced points between a and b.

functionmatr(A, ncol=none, nrow=none, byrow=F)

Make a matrix from the elements of A The matrix A is reformed to a matrix with ncol columns or nrow rows. byrow : If true, the elements are inserted row by row, else column by column

functioncbind()

Add matrices horizontally (binding columns)

functionrbind()

Add matrices vertically (binding rows)

functionsummary(A)

Summary of quantiles and mean of A. The minimal and maximal value, the 0.25,0.5,0.75 quantiles and the mean are printed.

functiont(A)

Transpose of A.

functionapply(A:real, where:integer, what:string)

Apply function "what" to where=1,2 (col or row)

functiondnorm(x, m=0, sigma=1)

Gau� density with mean m and deviation sigma

functionpnorm(x, m=0, sigma=1)

Gau� distribution with mean m and deviation sigma

functionqnorm(x, m=0, sigma=1)

Gau� distribution with mean m and deviation sigma

functionrnorm(n:integer, m=0, sigma=1)

Simulate the Gau� normal distribution n times.

functionrplot(x,y=none,rtype="p",style=none)

Plots x and y. 'p' : point plot 'l' : line plot 'b' : both 'h' : histogram plot 's' : surface plot See:

statplot (Statistics with Euler Math Toolbox)

mf:=[1,1,1,1];

functionpar(mfrow=none, mfcol=none)

Sets plot parameters. The following splits the screen to plot fields. The plot functions will automatically advance to the next field. If write an own plot routine, use mfadvance() to advance to the next field. Use h=holding(1) to stop the plots from beeing deleted, and holding(h) to restore the hold state. mfrow : multi frames with [n,m] fields filled by rows mfcol : multi frames with [n,m] fields filled bycols

functionmfadvance()

Advance to the next plot field.

functionrhist(x,style="O")

Histogram of the data in x.

functionrboxplot()

Summary of the data in graphical form. Shows the 0.25,0.5,0.75 quantiles. style : If present, it is used as fill style, the default is "O", an unfilled style. Try "0#", "/", "\", "\/", "|". See:

boxplot (Statistics with Euler Math Toolbox),

boxplot (Maxima Documentation)

functionabline(a,b=none,color=1)

Add a regression line to the plot