Last active
August 29, 2015 14:10
-
-
Save Buntix/e60b88be7a344f64dd79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noises.stack <- na.omit(stack(read.csv('Pilot_Transpose_arules test.csv', header=FALSE))) | |
noises.stack$syllables <- 1 | |
noises.stack$time <- cumsum(noises.stack$syllables) | |
noises.stack <- noises.stack[,c('ind', 'time', 'syllables', 'values')] | |
# convert cols to factors and then change the dataframe into a transactions class object | |
noises.col_names <- names(noises.stack) | |
noises.stack[,noises.col_names] <- lapply(noises.stack[,noises.col_names], factor) | |
noises.tran <- as(noises.stack, 'transactions') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment