- This topic has 4 replies, 4 voices, and was last updated 5 years, 1 month ago by .
Viewing 4 reply threads
	
Viewing 4 reply threads
	
You must be logged in to reply to this topic. Login here
 Pacharapol Withayasakpunt.
Pacharapol Withayasakpunt. tullaya.sita
tullaya.sitaHi all,
I have a problem in converting CSV file into transaction data using as,(.. transaction)
I try many ways to create transaction data but it didn’t work. Can anyone help me giving some hint or idea for doing this?
Thank you!
 w.thanachol
w.thanacholTransaction function allow only factor variable and I found that X variable (which is the first one) is not compatible. please change X variable to be factor type before transforming the data frame into a transaction.
use syntax: afi$x <- as.factor(afi$x)
 Pyae Phyo Aung
Pyae Phyo Aungcolumn( X)  is not logical or a factor. Discretize the columns first.
There are two methods for it. One is as off @Thanachol.
Second is
afi$X <- discretize(afi$X) then you can create transactions
trans <- as (afi,”transactions”)
Or for this data only. You can remove with index because it should not include in analysis (X is just serial number).
You can do it by indexing. It will not raise any error during transactions.
tarns <- as (afi[,-1], “transactions”)
 tullaya.sita
tullaya.sitaThank you for all answers you’ve shared ka.
 Pacharapol Withayasakpunt
Pacharapol WithayasakpuntIt seems that discretizeDF() is more perfect, but you have to visualize.
Then fix some columns with as.factor(data$row).
You must be logged in to reply to this topic. Login here
