documents:111012rtricks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
documents:111012rtricks [2012/02/14 21:37] – kota | documents:111012rtricks [2012/06/13 12:38] – kota | ||
---|---|---|---|
Line 52: | Line 52: | ||
[{{: | [{{: | ||
+ | |||
+ | ... a bit faster way calculation wise uses indexing. | ||
+ | <sxh> | ||
+ | width <- 10 | ||
+ | height <- 20 | ||
+ | x <- c(1:width) | ||
+ | y <- c(1:height) | ||
+ | xindex <-rep(x, length = width*height) | ||
+ | yindex <- yindexing(x, | ||
+ | |||
+ | z <- xindex + yindex | ||
+ | |||
+ | z <- matrix(z, nrow=width, ncol=height) | ||
+ | mat <- list(x, y, z) | ||
+ | image(x, y, z) | ||
+ | |||
+ | yindexing <- function (x, y) { | ||
+ | for(i in y){ | ||
+ | cr <- rep(i, length=length(x)) | ||
+ | if (i==1) all <- cr | ||
+ | else all <- append(all, cr) | ||
+ | } | ||
+ | return (all) | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | ===== Inserting math formula & symbols in label or title ===== | ||
+ | |||
+ | The easiest way is to use function // | ||
+ | < | ||
+ | plot(back$V2, | ||
+ | </ | ||
+ | Inserts vertically centered dot in the x label between " | ||
+ | < | ||
+ | ?plotmath | ||
+ | </ | ||
+ | |||
+ | More recent, but under development is using [[http:// | ||
+ |
documents/111012rtricks.txt · Last modified: 2020/11/26 07:08 by kota