Description Usage Arguments Details Value Note Examples
View source: R/DsManipulation.R
Melt (transform) a dataframe into the following structure (transactions) and
return it. identity_columns
become variable
and values under
each dataset column becomes 'value'.
1 | meltDataFrame(df, identity_columns = names(df)[1])
|
df |
Data frame with Feature_name column and feature frequency per dataset |
identity_columns |
Column name for the feature name (default first column's name) |
Feature_Name | DSA | DS0 | DS1 | ... | DSN ABC | 0.1 | 0.3 | 0.999 | 0.76 | ... | 0.444
into a feature per single dataset per value rows. For example
Feature_Name | variable | value ABC | DSA | 0.1 ... | DSA | ... ABC | DS0 | 0.3 ... | DS0 | ... ABC | DS1 | 0.999 ... | DS1 | ... ... ABC | DSN | 0.444 ... | DSN | ....
data frame
To change original column (dataset) order use df[,c(1, 8, 2:7)]
which moves the last column (i.e. dataset) into the second column.
1 | df_melted <- meltDataFrame(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.