Blog Archives

openrouteservice – geodata!

May 19, 2018
By
openrouteservice – geodata!

The openrouteservice provides a new method to get geodata into R. It has an API (or a set of them) and an R package has been written to communicate with said API(s) and is available from GitHub. I’ve just been playing around with the examples on this page, in the thought of using it for

Read more »

grconvertX and grconvertY

May 15, 2018
By
grconvertX and grconvertY

These two functions are unbelievably useful for positioning graphical elements (text, axes, labels, …) in R. They allow one to convert coordinates between various different formats. For instance, you can convert your user coordinate (say 5 where x ranges from 0 to 200) to normalized device coordinates (proportional distance across the device) and vice versa.

Read more »

Flow charts in R

May 9, 2018
By
Flow charts in R

Flow charts are an important part of a clinical trial report. Making them can be a pain though. One good way to do it seems to be with the grid and Gmisc packages in R. X and Y coordinates can be designated based on the center of the boxes in normalized device coordinates (proportions of

Read more »

Count models in JAGS

May 17, 2017
By
Count models in JAGS

Looks like I’ll be diving into some Bayesian analyses using JAGS. This post is primarily intended as a collection of links to useful information, but also includes a few initial thoughts (I might update it occasionally with new links). In terms of R packages, a very brief play suggests that R2jags is more user

Read more »

Emails from R

April 21, 2017
By
Emails from R

There are a few packages for sending email directly from R, but I work in a place where none of these work due to strict network settings. To at least partially circumvent this, here’s some code to produce a PowerShell script to send email(s) via Outlook. The PowerShell script can then be run either by

Read more »

“Pretty” table columns

April 10, 2014
By
“Pretty” table columns

Every now and then you might want to make a nice table to include directly in your documents without having to faff about with columns later in excel or word. Typical issues might be the specification of decimal places, converting a value and proportion/SE column into one to take the form of n (x) or

Read more »

Calculating confidence intervals for proportions

April 9, 2014
By
Calculating confidence intervals for proportions

Heres a couple of functions for calculating the confidence intervals for proportions. Firstly I give you the Simple Asymtotic Method: simpasym

Read more »

Import/Export data to and from xlsx files

April 5, 2013
By
Import/Export data to and from xlsx files

As Ive already written, getting data into R from your precious xlsx files is really handy. No need to clutter up your computer with txt or csv files. The previous post I wrote about the gdata package for importing data from xlsx files and was pointed to, among others, the xlsx package. xlsx seems to

Read more »

Mixed model R2 (UPDATED)

March 28, 2013
By
Mixed model R2 (UPDATED)

R2 is a useful tool for determining how strong the relationship between two variables is. Unfortunately, the definition of R2 for mixed effects models is difficult – do you include the random variable or just the fixed effects? Including just the fixed effects is essentially a standard linear model, while including the random effects could

Read more »

R-Studio

August 28, 2012
By
R-Studio

A post over on Dang, another error (show me yours and I’ll show you mine) has a method of working with R which uses an IDE called Eclipse in conjunction with a plugin called StatET. Eclipse is one of a number of IDEs that I’m aware of (Tinn-R being another, but this Sciviews pages has

Read more »

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)