knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Libraries

library(dplyr)
library(usethis)

Coefficient table

Create a coefficient table, a data.frame with a character column called probe and a numeric column called coeff.

If the model has an intercept give it the probe name Intercept, this value is expected so set this to 0 if you don't have one

datClock <- read.csv(system.file("extdata", "Horvath2013.csv", package = "DNAmAgeMini", mustWork = TRUE))
datClock <- datClock %>% 
    select(probe = CpGmarker, coeff = CoefficientTraining) %>%
    mutate(probe = as.character(probe))
datClock[1,1] <- "Intercept"

HorvathCoefficients <- datClock
HorvathCoefficients

dev

usethis::use_data(HorvathCoefficients)

Session Info

sessionInfo()

References



RichardJActon/DNAmAgeMini documentation built on May 23, 2019, 8:54 a.m.