best_swaps {detrendr} | R Documentation |

## Find the best `swaps`

parameter for *Robin Hood* detrending.

### Description

Use Nolan's algorithm to find the ideal `swaps`

parameter for *Robin Hood*
detrending.

### Usage

```
best_swaps(img, quick = FALSE)
```

### Arguments

`img` |
A 4-dimensional array in the style of an
ijtiff_img (indexed by |

`quick` |
If |

### Value

A natural number. The ideal `swaps`

parameter for boxcar detrending.
If there are multiple channels, the function returns a vector, one `swaps`

parameter for each channel.

### Examples

```
## Not run:
## These examples are not run on CRAN because they take too long.
## You can still try them for yourself.
img <- ijtiff::read_tif(system.file("extdata", "bleached.tif",
package = "detrendr"
))
best_swaps(img)
## End(Not run)
```

[Package

*detrendr*version 0.6.15 Index]