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
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 <arthur.stilben at gmail.com> 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 >
Below. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Jul 28, 2016 at 11:11 AM, Arthur Rodrigues Stilben <arthur.stilben at gmail.com> 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.Have you read the posting guide linked below? If not, please do so before posting (and apologizing) further. If so, then you'll soon get the hang of it. Most important: stay civil. We all do and say dumb things from time to time. Cheers, Bert> > 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 > > ______________________________________________ > R-help at 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.
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 ) ) > > 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 >> <arthur.stilben at gmail.com> 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
Thanks for reply, Bert. Em 28-07-2016 15:31, Bert Gunter escreveu:> Below. > > -- Bert > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Thu, Jul 28, 2016 at 11:11 AM, Arthur Rodrigues Stilben > <arthur.stilben at gmail.com> 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. > Have you read the posting guide linked below? If not, please do so > before posting (and apologizing) further. If so, then you'll soon get > the hang of it. Most important: stay civil. We all do and say dumb > things from time to time. > > Cheers, > Bert > > >> 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 >> >> ______________________________________________ >> R-help at 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.-- Arthur Rodrigues Stilben
On Thu, Jul 28, 2016 at 2:46 PM, Arthur Rodrigues Stilben <arthur.stilben at gmail.com> 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 >>> <arthur.stilben at gmail.com> 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 >>>>