reshape_as_raster: Reshape as raster vector

Description Usage Arguments Value Author(s) Examples

View source: R/plotting_tools.R

Description

Reshape as raster vector

Usage

1
reshape_as_raster(sol, dailySamples = 480)

Arguments

sol

Simulation (output of strogatz)

dailySamples

Number of samples per day (optional)

Value

The asleep vector reshaped as a raster vector

Author(s)

Pablo Rodríguez-Sánchez (https://pabrod.github.io)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Simulate a solution
y0 <- c(th1 = 0.1, th2 = 0.05)
nDays <- 60.2
ts <- seq(0, nDays*24, length.out=nDays*24*20)
sol <- strogatz(ts, y0)
# Get raster sleep vector
asleep_raster <- reshape_as_raster(sol)

## End(Not run)

PabRod/sleepR documentation built on Dec. 21, 2020, 3:27 p.m.