Re: [R] Fuzzy_partition with fuzzy_trapezoid
Thanks, Sarah, for response. But you showed me an example with fuzzy_variable. I'd like to use fuzzy_partition. I also tried: > teste = fuzzy_partition(varnames = c('a', 'b'), FUN = fuzzy_trapezoid, > corners = c(1,2,3,4), height = c(1,1) ) But the trapezoids 'a' and 'b' were overlap. Is there a way to construct two separeted trapezoids with fuzzy_partitions? 2016-08-02 12:51 GMT-03:00 Sarah Goslee <sarah.gos...@gmail.com>: > As already discussed, yes, but you can't specify corners and height > twice in a single call. > Please do read the help for the functions you're interested in, and > perhaps go back to refresh yourself on some basic R. > >> sets_options("universe", seq(from = 0, to = 10, by = 0.1)) >> test1 = fuzzy_variable( a = fuzzy_trapezoid( corners = c( 0, 1, 2, 3 ))) >> >> sets_options("universe", seq( from = 0, to = 5, by = 0.1 )) >> test2 = fuzzy_variable( b = fuzzy_trapezoid( corners = c( 4, 5, 6, 7 ))) >> > > On Tue, Aug 2, 2016 at 11:14 AM, Arthur Stilben > <arthur.stil...@gmail.com> wrote: >> I already made this question, but I was not subscribed and not >> received any reply. I tried this: >> >>> install.packages("sets") >> ... >>> library(sets) >>> teste = fuzzy_partition(varnames = c('a', 'b'), FUN = fuzzy_trapezoid, >>> corners = c(1,2,3,4), height = c(1,1), corners = c(5,6,7,8), height = >>> c(1,1) ) >> >> But I got this error: >> >> Error in FUN(i, ...) : >> formal argument "corners" represents multiples specified arguments >> >> Is it possible to combine fuzzy_partition with fuzzy_trapezoid? >> >> Att, >> -- Arthur Rodrigues Stilben Geoinformática - LENEP (22) 2765-6555 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Fuzzy_partition with fuzzy_trapezoid
I already made this question, but I was not subscribed and not received any reply. I tried this: > install.packages("sets") ... > library(sets) > teste = fuzzy_partition(varnames = c('a', 'b'), FUN = fuzzy_trapezoid, > corners = c(1,2,3,4), height = c(1,1), corners = c(5,6,7,8), height = c(1,1) ) But I got this error: Error in FUN(i, ...) : formal argument "corners" represents multiples specified arguments Is it possible to combine fuzzy_partition with fuzzy_trapezoid? Att, -- Arthur Rodrigues Stilben Geoinformática - LENEP (22) 2765-6555 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Fuzzy variable universe
Thanks, Sarah, for the reply. It really works. 2016-07-28 15:50 GMT-03:00 Sarah Goslee: > On Thu, Jul 28, 2016 at 2:46 PM, Arthur Rodrigues Stilben > wrote: >> >> >> Em 28-07-2016 15:45, Arthur Rodrigues Stilben escreveu: >>> >>> Sarah, >>> >>> First of all, thanks for reply. >>> >>> Second, It really works, but in fact I would to like to set individuals >>> universe groups for each fuzzy_variable. Something like this: >>> >>> > test1 = fuzzy_variable( a = fuzzy_trapezoid( corners = c( 0, 1, 2, 3 ) >>> > ), universe = seq( from = 0, to = 10, by = 0.1 ) ) >>> > test2 = fuzzy_variable( b = fuzzy_trapezoid( corners = c( 4, 5, 6, 7 ) >>> > ), universe = seq( from = 0, to = 5, by = 0.1 ) ) > > You have to do it as two steps. fuzzy_variable() doesn't accept a > universe argument. > > sets_options("universe", seq(from = 0, to = 10, by = 0.1)) > test1 = fuzzy_variable( a = fuzzy_trapezoid( corners = c( 0, 1, 2, 3 ))) > > sets_options("universe", seq( from = 0, to = 5, by = 0.1 )) > test2 = fuzzy_variable( b = fuzzy_trapezoid( corners = c( 4, 5, 6, 7 ))) > > But there's no reason you can't set it as many times as you want. > >>> Em 28-07-2016 15:25, Sarah Goslee escreveu: As Jeff suggested, I read the help for you. Based on the examples, you need: ## set universe sets_options("universe", seq(from = 0, to = 10, by = 0.1)) teste2 = fuzzy_variable( a = fuzzy_trapezoid( corners = c( 0, 1, 2, 3 ) ) ) comparing plot(teste) # complete with Warning and plot(teste2) makes me think this did what you wanted. At least, it did something. Sarah On Thu, Jul 28, 2016 at 2:11 PM, Arthur Rodrigues Stilben wrote: > > Sorry, I forgot to mention: > >> install.packages("sets") > > ... >> >> library(sets) >> teste = fuzzy_variable( a = fuzzy_trapezoid( corners = c( 0, 1, 2, 3 ) >> ), >> universe = seq( from = 0, to = 10, by = 0.1 ) ) >> teste > > A fuzzy variable with values: a, universe > > The ideia is to set the universe group for the fuzzy variable, but it > didn't > work. > > PS.: I'm newbie here, so I apologize for some mistakes :P. > > Att, > > Em 28-07-2016 11:23, Jeff Newmiller escreveu: >> >> This appears to be a question about a contributed package, though you >> have >> not specified which one (so your example code is not reproducible). >> >> Be warned that I have never seen discussion of fuzzy logic on this >> list, >> so any help you get here is likely to be from someone reading the >> documentation for you. Please be sure to read it carefully yourself >> first, >> and read about reproducibility and support for contributed packages in >> the >> Posting Guide. > > > -- > Arthur Rodrigues Stilben > -- Arthur Rodrigues Stilben Geoinformática - LENEP (22) 2765-6555 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Fuzzy variable universe
Hello, everyone! Is there a way to set universe group for each fuzzy_variable? I try to do this: > teste = fuzzy_variable( a = fuzzy_trapezoid( corners = c( 0, 1, 2, 3 ) ), > universe = seq( from = 0, to= 10, by = 0.1 ) ) But when I print teste: > teste A fuzzy variable with values: a, universe So, how can I set universe on fuzzy_variable? -- Arthur Rodrigues Stilben Geoinformática - LENEP (22) 2765-6555 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to use fuzzy_partition with fuzzy_trapezoid
Hello, guys! I tried to do that: > teste = fuzzy_partition( varnames = c( "a", "b" ), FUN = fuzzy_trapezoid, > corners = c( 0, 1, 2, 3), corners = c(4, 5, 6, 7)) Error in FUN(i, ...) : argumento formal "corners" corresponde a múltiplos argumentos especificados So, how can I use fuzzy_partitions to generate multiples trapezoids? -- Arthur Rodrigues Stilben Geoinformática - LENEP (22) 2765-6555 __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.