The TaoTeProgramming R package
I’d like to do a song of great social and political import.
The code that created the illustrations in Tao Te Programming is now available as the TaoTeProgramming package on CRAN.
I’d like to do a song of great social and political import.
The code that created the illustrations in Tao Te Programming is now available as the TaoTeProgramming package on CRAN.
Another of the all ye entering here.
When subscripting an xts
object, columns that don’t exist in the object are silently ignored.
First, create an xts
object:
xtx <- xts(cbind(a=1:4, b=11:14, c=21:24), order=Sys.Date() + 1:4)
which looks like: Read more →
Chapter 32 of Tao Te Programming advises you to make bricks instead of monoliths. Here is an example. The example is written with the syntax of R and is a data analysis, but the principle is valid no matter what language you use or what your task is.
Here is an outline of a function reminiscent of many novice attempts:
monolith <- function (data, col="blue", pch=21) { # transform data # fit model to data # plot data, uses 'col' and 'pch' # get desired model results # return desired model results }
Each of these comment lines may be many lines of code so that the whole function runs to pages. Read more →