Description Usage Arguments Value Author(s) Examples
View source: R/output_standardized.R
This function standardized specified columns within a dataframe to have a mean of 0 and a standard deviation of 1. The standardized dataframe is exported to a tab separated file of a provided name. The mean and variance, used to standardize the dataframe, are outputted to a separate file.
1 | output_standardized(datafile, col_names, filename, should_append = FALSE)
|
datafile |
A dataframe input containing data for standardization. |
col_names |
A list of column names corresponding to the inputted dataset, specifies which columns to standardize. |
filename |
A character string denoting the name of the outputted files. |
should_append |
A boolean variable denoting if the outputted files should overwrite existing files or be appended to existing files. |
Returns a transposed matrix of standardized data. Exports a the standardized dataframe to a tab separated file. Exports coefficients used to standardize data to a separate tab separated file.
Brent Murphy
1 2 3 4 5 6 7 | test1 <-data.frame(x = c(1,2,3,4,5),
y = c(2,4,6,8,10),
z = c(15,20,30,40,50))
colnames(test1)<-c("ONE","TWO","THREE")
output_standardized(datafile = test1,
col_names = c("ONE","TWO","THREE"),
filename = "testfiles")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.