-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResults.Rmd
91 lines (55 loc) · 2.19 KB
/
Results.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
title: "NIRS2019"
author: "Gude & Georgevici"
date: "30 12 2019"
output:
pdf_document: default
html_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
## Clean the environmend
clean.it <- function() {
basic.packages <- c("package:stats","package:graphics",
"package:grDevices","package:utils",
"package:datasets","package:methods",
"package:base")
package.list <- dplyr::setdiff( search()[ifelse(unlist(gregexpr("package:",search()))==1,TRUE,FALSE)] , basic.packages)
if (length(package.list)>0) for(package in package.list) detach(package, character.only=TRUE)
ll <- dplyr::setdiff( ls(envir = globalenv()), ## objects to exclude from cleaning
c("clean.it"))
rm(list = ll, envir = globalenv()); gc() # or sessionInfo()
if(!require(pacman))install.packages("pacman")
pacman::p_load(tidyverse,magrittr,stringi,readxl,fs,
chron,lubridate,tsibble,zoo, here)
}
clean.it() # clean the environment and unload and reload the libraries
# not-in-list function
"%ni%" <- Negate("%in%")
```
## Uninterpolated raw data, without patient 58 (the baseline was not documented)
```{r import raw data}
```
# The NIRS data without interpolation
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
Note that the `echo = FALSE` parameter was added to the `r 2+3` code chunk to prevent printing of the R code that generated the plot.
```{r include = FALSE}
# colorFunc <- "heat.colors"
colorFunc <- "terrain.colors"
# colorFunc <- "topo.colors"
# colorFunc <- "cm.colors"
# colorFunc <- "rainbow"
```
Base R comes with many functions for generating colors. The code below demonstrates the `r colorFunc` function.
## `r colorFunc`
```{r fig.cap = "The Maunga Whau volcano.", echo = FALSE}
image(volcano, col = get(colorFunc)(200))
```
This project contains the materials for lesson 7 of the [R Markdown tutorial](https://rmarkdown.rstudio.com/lesson-7.html). To begin the lesson, press the play button at the top right of the code chunk below. Then refer to the viewer pane.