added Java interface for R