norm_compass: Normalization for compasses

View source: R/norm_compass.R

norm_compassR Documentation

Normalization for compasses

Description

Function used to create data frame for compasses.

Usage

norm_compass(x, riket_index = length(x))

Arguments

x

Vector, commonly a column in a data frame.

riket_index

Index where 'riket'-row exist.

Value

Normalized vector.

Examples

# Normalize data

compass_data[,-1] <- apply(compass_data[,-1], 2, norm_compass)

# Make sure that the lowest value is the worst value in every column.
# If it is reversed, do like this:

compass_data$AE90 <- 1 - compass_data$AE90


swehip/shprplotfun documentation built on Oct. 21, 2022, 8:26 a.m.