scale_as_matrix: scale_as_matrix

Description Usage Arguments Value

View source: R/scale_as_matrix.R

Description

Adapted version of scale for tibble objects

Usage

1
scale_as_matrix(data, key_col, value_col, scale = TRUE, center = TRUE)

Arguments

data

a tibble containing a matrix of data

key_col

Strings giving names of key and value columns to create

scale

either a logical value or a numeric-alike vector of length equal to the number of columns of data - 1.

center

either a logical value or numeric-alike vector of length equal to the number of columns in data - 1, where 'numeric-alike' means that as.numeric(.) will be appled successfully is is.numeric(.) is not true.

Value

A tibble with the same shape as data, with the columns scaled.


welch16/rwlib documentation built on Jan. 13, 2020, 1:27 p.m.