val4symb | R Documentation |
Center a numerical vector on a parameter position and provides absolute values and colors according to negative and positive values
val4symb(x, FUN=mean, col = c("blue", "red"),...)
x |
a numerical vector |
FUN |
a function computing a position parameter, typically |
col |
a character vector of 2 values, default=c("blue","red"), blue for <0, red for >=0 |
... |
optional arguments to 'FUN' |
A list with
size |
the absolute values of the difference to the position parameter (eg mean, median) |
col |
a character vector with 2 colors, each corresponding to positive or negative values |
symbols
, mean
, median
, scale
x<-rnorm(30)
y<-rnorm(30)
z<-val4symb(rnorm(30))
symbols(x,y,circle=z$size,inches=0.2,bg=z$col)
z<-val4symb(scale(rnorm(30)))
symbols(x,y,circle=z$size,inches=0.2,bg=z$col)
z<-val4symb(rnorm(30),col=c("green","violet"))
symbols(x,y,circle=z$size,inches=0.2,bg=z$col)
z<-val4symb(rnorm(30),trim=0.025)
symbols(x,y,circle=z$size,inches=0.2,bg=z$col)
z<-val4symb(rnorm(30),median)
symbols(x,y,circle=z$size,inches=0.2,bg=z$col)
myfun<-function(x) 20 # passes an arbitrary constant
z<-val4symb(1:30,myfun)
symbols(x,y,circle=z$size,inches=0.2,bg=z$col)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.