opensafely-core / r-docker

Docker image for running R scripts in OpenSAFELY
1 stars 3 forks source link

Add R package #89

Closed BillyZhongUOM closed 2 years ago

BillyZhongUOM commented 2 years ago

Can anyone please add the following R package?

tsModel Epi vcd

BillyZhongUOM commented 2 years ago

The package "tsModel" will easily generate lag residual in an interpreted time series analysis. It can help adjust autocorrelation within the model which is really needed.

StevenMaude commented 2 years ago

The Epi package was previously added in #82, but not sure if there's a problem with it: #84.

I also note this comment in packages.txt:

# Epi - installed but the automated test import doesn't work for it
StevenMaude commented 2 years ago

@bloodearnest: do you have any more context around what the status of the Epi package is here?

If I run the current published R Docker image, then I get:

> library("Epi")
Error in library("Epi") : there is no package called 'Epi'

I then ran ./add-pkg.sh Epi which seemed to work fine and then using that version of the image, it seems to work as intended:

> library("Epi")
> data(lungDK)
> lungDK
    A5   P5   C5 up       Ax       Px       Cx    D          Y
1   40 1943 1898  1 43.33333 1944.667 1901.333   52 336233.833
2   40 1943 1903  0 41.66667 1946.333 1904.667   28 357812.667
…

(lungDK is a feature of the Epi package.)

Possibilities: