Blog Archives

static symbols too?

June 5, 2010
By

Continuing in the context of this previous post… 1. Select a static symbol from the R sources, like Connections $ grep "static Rconnection Connections" src/main/connections.c static Rconnection Connections; 2. Get its address $ objdump -t `R RHOME`/bin/exec/R | awk '/ Connections/ {print $1}' 000000000093b700 3. Use the symbol > library(inline) > code <- " +

Read more »

Plans for a Real tty Connection

June 2, 2010
By

I reverted the name of the tty connection that I described previously, to “serial” connection and updated the patch to R 2.11.1. This name is more appropriate to its function and also makes way for another patch I am working on which implements the full POSIX terminal interface (essentially all of termios.h). The connection provided

Read more »

Picture of me with Chengwu Yang, PhD

June 2, 2010
By
Picture of me with Chengwu Yang, PhD

Read more »

Recent picture of my niece Lily

June 1, 2010
By
Recent picture of my niece Lily

Read more »

Access attribute_hidden Functions in R Packages

June 1, 2010
By
Access attribute_hidden Functions in R Packages

Maybe the title should have been prepended with “Don’t…” The source code of R is littered with “attribute_hidden” declarations. These declarations attempt to ensure that the variable or function may only be accessed by code in the core R distribution, and not by R extension packages. Generally there is a good reason for this. For

Read more »

House Mountain Hike

May 17, 2010
By
House Mountain Hike

My wife Mary and my Dad Wesley and I took a hike this weekend (5/14/10) to the House Mountain state recreation area in Knox county, Tennessee. The hike was about 3.8 miles with a total elevation gain of around 1000 feet (940.23ft by GPS). The plot below gives the elevation profile over the course of

Read more »

Collect and Parse GPS (NMEA0183) Data in R

May 11, 2010
By

I recently wrote a serial connection for R-2.11.0 so that I can communicate with serial devices, for example an old Garmin eTrex Legend. This GPS device is able to output NMEA0183 sentences to a standard serial port (4800,8,1,N). I hooked up the device and used the serial connection to collect some data using some R

Read more »

A serial Connection for R

April 26, 2010
By

***UPDATED: June 3, 2010 – revert name from “tty” to “serial“, R version (2.11.1)*** I’m working on a patch for R (currently 2.11.1) that adds a serial connection feature for POSIX systems (i.e. Linux, Mac OS X, …). The serial connection works like the other connections. For example, the following code opens, writes a single

Read more »

Matrix determinant with the Lapack routine dspsv

April 6, 2010
By

The Lapack routine dspsv solves the linear system of equations Ax=b, where A is a symmetric matrix in packed storage format. However, there appear to be no Lapack functions that compute the determinant of such a matrix. We need to compute the determinant, for instance, in order to compute the multivariate normal density function. The

Read more »

ECG Signal Processing

March 24, 2010
By
ECG Signal Processing

After reading (most of) “The Scientists and Engineers Guide to Digital Signal Processing” by Steven W. Smith, PhD, I decided to take a second crack at the ECG data. I wrote a set of R functions that implement a windowed (Blackman) sinc low-pass filter. The convolution of filter kernel with the input signal is conducted

Read more »