%PROJECT% - %PACKAGE%'

# ===================== HELPER CODE ==========================
if(FALSE) {
  library(D4TAlink.light)
  #library(D4TAlink)
  setTaskSponsor("%SPONSOR%")
  setTaskStructure(pathsDefault)
  try(setTaskRoot("%ROOT%"))

  # load the task
  task <- loadTask(project="%PROJECT%", package="%PACKAGE%", taskname="%TASK%")

  # render the task
  shell.exec(renderTaskRmd(task,suffix="%SUFFIX%"))

  # archive the task to the home directory
  archiveTask(task,zf<-paste0("~/",task$task,".zip"),overwrite=FALSE)

  # settings for new repository
  oro <- getTaskRoot() 
  setTaskRoot("/PATH/TO/NEW/REPOSITORY")
  ost <- getTaskStructure() 
  setTaskStructure(pathsDefault)

  # copy the task to a new repository
  newtask <- restoreTask(zf)
  print(list.files(getTaskPaths(newtask)$data,
                   full.names=FALSE,recursive=TRUE))

  #restore old settings
  setTaskRoot(oro) 
  setTaskStructure(ost)
}
# ============================================================
options(warn=1)
knitr::opts_chunk$set(
  fig.cap = TRUE,
    eval = TRUE, 
    echo = FALSE,
    comment = "#",
  message = FALSE,
    error = TRUE, 
  warning = TRUE,
    dpi = 150,
  dev.args = list(pointsize=8)
)
library(officedown)
library(officer)
# Load libraries
library(D4TAlink.light)
#library(D4TAlink)
setTaskSponsor("%SPONSOR%")
setTaskStructure(pathsDefault)
# try(setTaskRoot("%ROOT%"))
# Load task
task <- loadTask(project="%PROJECT%", package="%PACKAGE%", taskname="%TASK%",quiet=TRUE)
# if task does not exist on repository, create it 
if(is.null(task)) {
  task <- initTask(project="%PROJECT%",
                   package="%PACKAGE%",
                   taskname="%TASK%",
                   sponsor="%SPONSOR%",
                   author="%AUTHOR%")
}

options(warn = 2)

\newpage

Scope

In this section the scope / rationale of the task should be explained.

Input

The section list the information and data sources.

# Code to load input data

# ta <- loadTask(task$project,task$package,"20220102_loadAssays)
# ass <- readBinary(ta,"assays")

Methods and Results

The results-section contains more details regarding the results of task X.

# Chunk that contains the analysis R code.

Table

head(data.frame(l=letters,L=LETTERS))

Plot

boxplot(1:8)

Output

The section contains detailed information on output (incl. location).

# Code to save data

# saveBinary(ass,ta,"assays")

\newpage

References

  1. R Core Team (2022). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.

\newpage

Appendices

Session information

# In the appendix the session information is being printed for reproducibility.

sessionInfo()

List of figures

List of tables



Try the D4TAlink.light package in your browser

Any scripts or data that you put into this service are public.

D4TAlink.light documentation built on April 4, 2025, 1:02 a.m.