Jan's Blog

Category: Programming

Creating a temporary SAS array of dynamic size

Arrays in SAS are incredibly useful things. For example, if you’re dealing with a concomitant medications dataset and want to check for certain medicines across multiple columns, you’d be hard-pressed to find a faster method than using arrays! Within the SDTM.CM domain, medication names are spread across several columns, usually: CMTRT (Reported Name of Drug, […]

Significant Figures in SAS

For three significant figures, the SAS Institute provides the following code snippet to accomplish the task. However, it is often useful to round to more or less than 3 significant figures. I’ve developed a macro to do so for my own use and am sharing the code below.

NONMEM Dataset Example (free, with R code)

I’m making available here a basic NONMEM dataset example, along with the R code used to create it. Hopefully it will be helpful to someone in future! CSV download: http://jvdl.me/downloads/nonmem/dummy_nonmem.csv XPT download: http://jvdl.me/downloads/nonmem/dummy_nonmem.xpt

One-time-pad encryption with R and basic JavaScript

One-time-pad encryption offers unbreakable* security if you can guarantee truly random number generation and security of the generated pad. Implementing it from the perspective of a cryptographic layman is a fun way to learn more about it and could add an extra layer of security to your most sensitive communications. I started off by trying […]

Searching for a string in an entire SAS library

For the most part, experienced SAS programmers know where to look for the source data they need. In the pharmaceutical industry, we are familiar with CDISC standards and data structures. However, should the data standard be unfamiliar or the source datasets include new or unusual parameters, it may be prudent to have SAS look through […]

Back to top