Publications by Duong Tran

Daily Stock Prices Plots with ggplot2

17.12.2022

Introduction These plots were created from ggplot2 and the purpose of this is to identify possible trends among stock prices. That is - does a particular group of stocks tend move in tandem; why some stocks surge at a particular point; does their prices affected by economic and political crisis etc. By studying these historical prices data one ma...

770 sym 3 img

Clinical Reporting R Packages

29.12.2022

Introduction There are now a number of R packages that are specifically for Clinical Reporting. The following plots show their daily downloads - an indication of their popularity. I’ve also included two of the most popular packages - dplyr and ggplot2 for some perspective of the R’s community. Set 1 Set 2 ...

323 sym 3 img

Colour Palettes

29.12.2022

I generated, and am sharing some colour palettes that I like. Colours are an important factor in visualisation; a ‘better’ scheme can draw more attraction to yours works. Set 1 ...

187 sym 1 img

Calling R from Windows SAS

11.12.2020

Introduction There are two methods for calling R from SAS; in batch mode as describe in (Holland, Wei) and via the PROC IML interface provides by SAS. This tutorial will only go through the setting up for the second method, follows by some usage examples. Requirements Check that SAS and R are installed on the same machine (server), then run (PRO...

2169 sym R (2286 sym/4 pcs) 1 img

Clinincal Graphs with ggplot2

01.12.2020

Introduction Hi I am Duong, a SAS programmer with many years of experience in the Pharmaceutical industry and I have been teaching myself R in the past year. I have produced some graphs with the ggplot2 package and now would like to share them with my thoughts and experiences. If you are about to set off a similar journey, these results and thoug...

3577 sym 8 img

Reading Raw Data

05.12.2020

The first task before any data analysis can begin is of course importing the data into the software application that you are using. And this often means reading the data from a comma-separated values (CSV) file. This tutorial gives a brief introduction on how R imports a CSV file. There is more than one package that can do this, but here we shall...

2351 sym R (1920 sym/11 pcs)

Mixing SAS and R Plots

26.04.2021

Introduction Multiple plots on a graph is often desired; in lattice, panel or sometime as inset layouts. SAS and R, both have functionalities for these display, but have you ever thought of combining SAS and R plots? Not by cut and paste but programmatically. This is absolutely possible and I shall go over such a technique with some examples in t...

2340 sym R (1516 sym/1 pcs) 3 img

A SAS RTF Parser Macro with the Aid of an R Package

18.04.2021

Introduction Extracting data from a Rich Text Format (RTF) table is a common need. For example, in clinical trial reporting, this desire of extracting RTF tables and converts them into SAS datasets are mainly for two reasons. One, to validate tables and listings (TLs) programmatically; secondly, to compare different versions of (TLs). There are p...

3060 sym R (3414 sym/4 pcs) 2 img

flextable

05.06.2021

Introduction flextable is a fantastic package for tabulating static tables. The outputs can be saved as (html, docx, ptx, png) formats and its grammar is similar to that of ggplot2, where each additional aspect to a table is build-up of statements separate by the pipe symbol “%>%”. The API is very well designed with rich functionalities. You ...

3755 sym R (2292 sym/3 pcs) 4 img