Skip to content
Snippets Groups Projects
Commit 57d14cc7 authored by Seifert, Prof. Dr. Stephan's avatar Seifert, Prof. Dr. Stephan
Browse files

Projekt angelegt und Daten gespeichert

parent 9e3bbec4
Branches
No related tags found
No related merge requests found
File added
data
myTabl = function(data){
DT::datatable(data, rownames = FALSE,
class = 'cell-border stripe',
extensions = 'Buttons',
options = list(dom = 'Bfrtip',
buttons = c('copy', 'excel', 'pdf'),
autoWidth = TRUE))
}
myPlot = function(data){
}
\ No newline at end of file
*.pdf
*.RData
*.tex
*.log
This diff is collapsed.
cache
simulation_binary.Rnw
simulation_quantitative.Rnw
## information about directories
subproject.dir = dirname(getwd())
project.dir = dirname(dirname(subproject.dir))
## data
input.dir = file.path(project.dir, "data_input")
data.dir = file.path(subproject.dir, "data")
## analysis
plots.dir = file.path(subproject.dir, "img")
## functions
functions.dir = file.path(subproject.dir, "R_functions")
## load libraries
require(DT) ## interactive tables
require(R.utils) ## loadObject(), saveObject()
require(metricsgraphics) ## interactive graphs
require(summarytools)
require(SummarizedExperiment)
## replace = with <-; set code/output width to be 68
#options(replace.assign=TRUE)
## functions
files = dir(functions.dir, pattern = ".R*", full.name = TRUE)
if (length(files) > 0) {
print(paste("loading", length(files), "file(s) ..."))
for (f in files) {
source(f)
}
}
set.dir = function(dir) {
if (!file.exists(dir)) {
dir.create(dir, recursive = TRUE)
}
return(dir)
}
get.no.lines = function(f) {
temp = system(paste("wc -l", f), intern = TRUE)
return(as.numeric(unlist(strsplit(temp, " "))[1]))
}
---
title: "Example of title"
author: "Dr. Stephan Seifert"
date: '`r Sys.Date()`'
output:
html_document:
code_folding: hide
highlight: textmate
toc: yes
toc_float: yes
pdf_document:
toc: yes
---
\clearpage
```{r echo = FALSE, results = "hide", message = FALSE}
source("init.R")
```
\clearpage
```{r child = "subscript.Rmd"}
```
\clearpage
# Session information
```{r}
sessionInfo()
```
This diff is collapsed.
```{r, echo=F, message=F, warning=F}
library(DT, quietly = T)
```
# Tables
This is an example how you can create interactive Tables with datatable function, Kable and Xtable can be used for "normal" tables.
```{r}
data("iris")
datatable(iris, rownames = FALSE,
caption = "Table 1: This is a Table",
class = 'cell-border stripe',
extensions = 'Buttons',
options = list(dom = 'Bfrtip',
buttons = c('copy', 'excel', 'pdf'),
autoWidth = TRUE))
```
# Graphs
Here you can see how interactive graphs can be created based on mjs_plot function
```{r}
mjs_plot(iris[,1:2], x = colnames(iris)[1], y = colnames(iris)[2]) %>%
mjs_point() %>%
mjs_labs(x = colnames(iris)[1], y = colnames(iris)[2])
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment