Learn R Programming

rgeoda (version 0.0.6)

standardize: Standardize Data (Z)

Description

Standarize data by transforming data to have zero mean and unit variance

Usage

standardize(data)

Arguments

data

A list of numeric vectors (multi-variables) for standardization

Value

A list of numeric vectors from standardization (Z)

Examples

Run this code
# NOT RUN {
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
guerry_df <- as.data.frame(guerry) # use as data.frame
crm_prs <- guerry_df['Crm_prs'][,1] # get values of variable "crm_prs"
crm_prp <- guerry_df['Crm_prp'][,1] # get values of variable "crm_prp"
data <- list(crm_prs, crm_prp)
standardize(data)
# }

Run the code above in your browser using DataLab