coarsen_index: Coarsen an index vector to a given resolution

Description Usage Arguments Value Author(s) Examples

View source: R/gfpca_helpers.R

Description

Reduce the resolution of a numeric vector by specifying the number of significant_digits to which the numbers should be rounded.

Internal function used to coarsen the index vector before estimating the two-step GFPCA with gfpca_twoStep.

Usage

1
coarsen_index(index, significant_digits)

Arguments

index

Numeric vector of index values.

significant_digits

Positive integer value.

Value

Numeric vector of rounded index values.

Author(s)

Alexander Bauer alexander.bauer@stat.uni-muenchen.de

Examples

1
2
3
4
5
6
7
index_vector = c(0.7892, 0.2984, 0.328)
registr:::coarsen_index(index_vector, 1)
registr:::coarsen_index(index_vector, 3)

index_vector2 = c(2803, -7639, 13)
registr:::coarsen_index(index_vector2, 1)
registr:::coarsen_index(index_vector2, 3)

julia-wrobel/registr documentation built on Jan. 16, 2022, 2:51 a.m.