# Monthly Archives: March 2014

## PK calculations for infusion at constant rate

March 16, 2014
By

In this third PK posting I move to chapter 10, study problem 4 of Rowland and Tozer (Clinical pharmacokinetics and pharmacodynamics, 4th edition). In this problem one subject gets a 24 hours continuous dose. In many respects the Jags calculation is not very different from before, but the relation between parameters in the model and PK parameters is a...

## Box models in R

March 16, 2014
By

Introduction Box models are popular in some branches of oceanography and other geophysical disciplines, partly because they are simple to construct and to solve. This posting shows how to solve a box model in R, using the lsoda() function in the deSolve package. The basic ideas can be explained in the context of riverine input into a lake that connects...

## Condorcet ranking and Rcpp – Part 1b

March 15, 2014
By

I’ve re-written the previous post a bit and now it is posted in the Rcpp gallery. I’ve had some really good comments, so I’ll probably have to post an updated version. Keep the comments coming! ∞

## Moving the North Pole to the Equator

March 15, 2014
By

I am still working with @3wen on visualizations of the North Pole. So far, it was not that difficult to generate maps, but we started to have problems with the ice region in the Arctic. More precisely, it was complicated to compute the area of this region (even if we can easily get a shapefile). Consider the globe, worldmap <- ggplot()...

## rfunctions Package on Github

March 15, 2014
By

This post is mostly an attempt to familiarize myself with Rmarkdown, jekyll, and github. I recently posted an R package (rfunctions), which contains some functions I wrote (or modified) that make my life a little easier. I’ll go through some examples in R to highlight the various functions included. Installation rfunctions is not available on CRAN, but can be installed...

## Vector Subsetting in Rcpp

March 15, 2014
By

Rcpp 0.11.1 has introduced flexible subsetting for Rcpp vectors. Subsetting is implemented for the Rcpp vector types through the [ operator, and intends to mimic R’s [ operator for most cases. We diverge from R’s subsetting semantics in a few important ways: For integer and numeric vectors, 0-based indexing is performed, rather than 1-based indexing, for subsets. ...

## Guardian Words: Visualized

March 15, 2014
By

Andy Kirk (@visualisingdata) & Lynn Cherny (@arnicas) tweeted about the Guardian Word Count service/archive site, lamenting the lack of visualizations: Want to know num of words written in each day's Guardian paper by section + approx reading time? http://t.co/wP4W1EzUsx via @bengoldacre— Andy Kirk (@visualisingdata) March 15, 2014 This gave me a chance to bust out

## First Post

March 14, 2014
By

This post is just a test Big Text Markdown seems pretty cool. I’d like to see if I can post a few R examples later

## A brief introduction to higher order functions in R

March 14, 2014
By

In R, function may not be as special as it is in other programming languages; it is regarded as one of the many types and can be passed as an argument to some other function. The way we deal with other objects such list and data.frame definitely applies to function. Here is a simple example in which we define...

## qdap 1.3.1 Release: Demoing Dispersion Plots, Sentiment Analysis, Easy Hash Lookups, Boolean Searches and More…

March 14, 2014
By

We’re very pleased to announce the release of qdap 1.3.1 This is the latest installment of the qdap package available at CRAN. Several important updates have occurred since the 1.1.0 release, most notable the addition of two vignettes and some … Continue reading →