Tag Archives: R

Using JavaGD in Java applications

Goal: Create a Java application with a JFrame that contains a JGDPanel from JavaGD and plot something via JRI. Solution: The following code is a derivate of JGR code snipplets under GPL-2: import java.awt.Component; import java.awt.event.WindowEvent; import java.awt.event.WindowListener; import javax.swing.JFrame; … Continue reading

Posted in Java, Programming, R | Tagged , , | Leave a comment

Because it is autumn

library(colorspace) branchvar <- 1 tree <- function(x, y, branch) {   lines(x,y,col=hex(RGB(0.1,0.4,0)))   wadd <- 0.7   if(branch>0) {     alpha <- atan2((y[2]-y[1]),(x[2]-x[1]))     len <- sqrt((y[2]-y[1])^2+(x[2]-x[1])^2)*0.6     tree(c(x[2],x[2]+abs(rnorm(1,1,branchvar))*len*cos(alpha)),           c(y[2],y[2]+abs(rnorm(1,1,branchvar))*len*sin(alpha)),     … Continue reading

Posted in Graphics, Programming, R | Tagged , , | 1 Comment

Shortcuts in R under Unix from the readline library

Under Unix you can use in R the the advanced features for command editing and command history that the GNU Readline Library provides. Both Emacs and vi editing modes are available and the Emacs-like keybindings are installed by default. Here … Continue reading

Posted in Programming, R | Tagged , | Leave a comment

Random Correlation Matrices

Some time ago one of my colleagues with a new method for evaluating the cumulative distribution function of a multivariate normal distribution wanted to compare the speed of his method with that of randomized quasi-Monte Carlo methods. While we were … Continue reading

Posted in R, Statistics | Tagged , , | Leave a comment