Re: [R] Fuzzy rules definition (package "sets") from data.frame

2013-05-08 Thread Johannes Radinger
Following my last mail, I found a simple solution using eval(parse)): df <- data.frame(depth=c("low","medium","high"),velocity=c("medium","medium","low"),suitability=c("low","medium","low")) df$rule <- paste("fuzzy_rule(depth %is% ",df[,"depth"]," && ","velocity %is% ",df[,"velocity"],", ","suitab

[R] Fuzzy rules definition (package "sets") from data.frame

2013-05-08 Thread Johannes Radinger
Hi, I just discovered the package "sets" and its ability to perform fuzzy systems calculations. The example in the manual of fuzzyinference() gives an overview how to develop rules. However my "rules" are already available as data.frame and I'd like to convert them into the format that is needed