search for: parens

Displaying 20 results from an estimated 360 matches for "parens".

Did you mean: parent
2001 Aug 02
1
gsub() and parenthesis symbols
Dear R-users -- I'm using R 1.3.0 on a PC running SuSE Linux 7.1. I'm confused by the following behavior from the gsub() function. Am I doing something wrong? ## A string of characters > string<-c("q","w","e","(",")","q","w","e") ## Use gsub to replace `q' with `A' >
2006 May 31
1
trouble with boot ()
Dear members, I am trying to use boot () to compute the distributions of a statistic of a data set. The statistic is defined in the following code: eds<-function(x) { r<-cor(x) paren<-1-abs(r)/2 denom<-sum(sum(paren)+0.5) desvio<-sd(x) media<-mean(x) a<-desvio/media
2007 Jun 18
1
Automatic paren/bracket closing in 2.5.0?
Hello, Just upgraded to 2.5.0, and found that R now includes an rparen (right parentheses) or rbracket whenever I enter in an lparen. While I can see the use of this function, it doesn't mesh well with my personal style of using R (e.g., using the up arrow, adding an rparen, jumping to the beginning of the line, and then wrapping a summary, for instance). Some 10 minutes of google
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
...ub user 1 (String.length user - 1)) >>>> + else >>>> + (Unix.getpwnam user).pw_uid in >>>> + debug "setting owner of %s to %d:root" file uid; >>>> + Unix.chown file uid 0 >>> >>> Hmm, doesn't this need parens around the 'then' clause? >> >> Ding ding ding, it does not :) >> >> I'm happy you asked. (I was so frustrated to discover this *once again* >> that I almost sent a separate tirade about it to the list! So I guess >> now I'll use the opportunity.....
2020 Sep 08
2
Re: [libnbd PATCH 1/2] generator: Refactor handling of closures in unlocked functions
...t; > diff --git a/generator/C.ml b/generator/C.ml > index deb77fa..280b319 100644 > --- a/generator/C.ml > +++ b/generator/C.ml > @@ -99,16 +99,17 @@ let rec name_of_arg = function > | UInt64 n -> [n] > > let rec print_arg_list ?(wrap = false) ?maxcol ?handle ?types ?(parens = true) > + ?(closure_mark) args optargs = You don't need parens around here, you can just write ?closure_mark > + if parens then pr "("; > + if wrap then > + pr_wrap ?maxcol ',' > + (fun () -> print_arg_list' ?handle ?types ?closure_...
2018 Mar 17
1
Inappropriate parens fix for Logic.Rd
...peof() and "class" refers to what is returned by class() in R. When typeof(x) is "double", class(x) is "numeric". When typeof(x) is "integer", class(x) is "integer". -------------------------------------------- > wrote: Subject: Inappropriate parens fix for Logic.Rd To: r-devel at r-project.org Date: Saturday, 10 March, 2018, 8:23 AM Logic.Rd is one of the files changed in r74363. Before change: ? \item{x, y}{raw or logical or \sQuote{number-like} vectors (i.e., of types ? ? \code{\link{double}} (class \code{\link{numeric}}), \code{\link{i...
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
..._string (String.sub user 1 (String.length user - 1)) > >> + else > >> + (Unix.getpwnam user).pw_uid in > >> + debug "setting owner of %s to %d:root" file uid; > >> + Unix.chown file uid 0 > > > > Hmm, doesn't this need parens around the 'then' clause? > > Ding ding ding, it does not :) > > I'm happy you asked. (I was so frustrated to discover this *once again* > that I almost sent a separate tirade about it to the list! So I guess > now I'll use the opportunity...) > > The shor...
2007 Feb 02
7
Coming Soon...
...actual.should_not equal(expected) #equal, in this example, is a method that returns an expectation matcher, which Ruby passes to #should, which then interacts with the matcher to evaluate whether or not the expectation is met and report accordingly. All args to expectation matchers will require parens, and blocks must be expressed using curly braces. This has to do with ambiguity of arguments and operator precedence. Don''t worry, if you do the wrong thing you''ll get a warning. More on this below. == Why this change? The current syntax is supported by some very clever use of m...
2010 Jul 30
4
Ferret installation
Hi guys, I''m very new to the RoR. So please be kind to me.. I''m having problems with ferret installation in rubygems. I''m on: ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-mingw32] Rails 2.3.8 and i''m running windows 7 x64 When i enter ''gem install ferret --version 0.11.6'', it returns this error: Building native extensions. This could
2006 Jun 26
4
why can''t I call this without parentheses?
I have a little helper that lets me add legacy fields to models where they have common prefixes, suffixes, or something else weird. Here is the method signature: def legacy_fields(options = {}, *attributes) ..... end options is a hash containing things like :prefix => "post_" - and attributes is a list of attribute names. This gets mixed into the class with extend, so I call
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
...then >> + int_of_string (String.sub user 1 (String.length user - 1)) >> + else >> + (Unix.getpwnam user).pw_uid in >> + debug "setting owner of %s to %d:root" file uid; >> + Unix.chown file uid 0 > > Hmm, doesn't this need parens around the 'then' clause? Ding ding ding, it does not :) I'm happy you asked. (I was so frustrated to discover this *once again* that I almost sent a separate tirade about it to the list! So I guess now I'll use the opportunity...) The short answer is that, if "Unix.chown&qu...
2006 Aug 25
2
rakefile DEBUG changes
We use an environment variable to control whether or not to enable a debug build of wxRuby. This was called simply DEBUG but I have renamed it to WXRUBY_DEBUG. I also added a second environment variable, WXRUBY_VERBOSE, which turns on extensive console output that can help debug memory problems. It prints a message any time an object is created, destroyed, etc. This used to only be an option in
2016 Jan 28
1
[PATCH] python: stop using parens-less print in tests
print "" is no more available in Python 3, and print(...) is available since Python 2.7; as one of the tests was using print(), use this form everywhere so the tests can run fine with Python 3. --- python/t/820-rhbz912499.py | 18 +++++++++--------- python/t/910-libvirt.py | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/python/t/820-rhbz912499.py
2002 Jul 19
3
Automatic adjustment of axis ranges
I had a look at this, and worked out most of a function to do it. There are three things I haven't been able to figure out, however. 1) Getting the last N lines of the command history into a vector of strings. I thought something like: last.commands<-history(N) would work, but no go. There doesn't seem to be a file that I can tail, either. 2) Finding continuation lines by
2016 Jan 05
0
deparse with parentheses for SUBSET
...versions through at least R-3.2.2. o Fixed a number of bugs in the deparser that are illustrated by the following, which produce incorrect output as noted, in R Core versions through at least R-3.2.2: deparse(parse(text="`+`(a,b)[1]")[[1]])# Omits necessary parens deparse(quote(`[<-`(x,1)),control="S_compatible") # unmatched " and ' deparse(parse(text="a = b <- c")[[1]]) # Puts in unnecessary parens deparse(parse(text="a+!b")[[1]]) # Puts in unnecessary parens deparse(parse(t...
2011 Dec 11
2
ToDo List Notation
I just joined this mail-list, so I apologize if this has been discussed before, but: Has anyone suggested adding a "todo list notation" to Markdown? Specifically, I'd like to see an open paren, brace or bracket, at the start of a line, followed by a space, a "/", or a "X", followed by a matching closing paren, brace, or bracket, followed by a space and more text
2009 Nov 06
2
mini_magick - 2 clarifications
1. I have seen examples similar to the following: image = MiniMagick::Image.from_file("input.jpg") image.resize "100x100" image.write("output.jpg") I''m assuming that image.resize is a method. Is there any significance to the fact that the argument for that method is not enclosed in parenthesis while the other are? Examples seem to be consistent --
2014 Oct 29
2
Unexpected behavior of identical() with language objects
I ran into this and found the result very surprising: identical( quote({ a }), quote({ a }) ) # FALSE It seems related to curly braces. For example, parens work fine: identical( quote(( a )), quote(( a )) ) # TRUE Is this expected behavior? I can't seem to find anything in the help for identical that relates to this. -Winston
2016 Jan 04
1
deparse with parentheses for SUBSET
...or me: diff -u -r A/src/main/deparse.c B/src/main/deparse.c --- R-devel 2/src/main/deparse.c 2015-08-09 18:09:04.000000000 +0200 +++ R-devel/src/main/deparse.c 2016-01-04 16:15:09.000000000 +0100 @@ -971,7 +971,11 @@ print2buff(")", d); break; case PP_SUBSET: + if ((parens = needsparens(fop, CAR(s), 1))) + print2buff("(", d); deparse2buff(CAR(s), d); + if (parens) + print2buff(")", d); if (PRIMVAL(SYMVALUE(op)) == 1) print2buff("[", d); else With this applied, the output is more consistent: > substit...
2023 Jun 29
1
[v2v PATCH v2 2/3] lib/utils: make "chown_for_libvirt_rhbz_1045069" fail hard
...g.is_prefix user "+" then > + int_of_string (String.sub user 1 (String.length user - 1)) > + else > + (Unix.getpwnam user).pw_uid in > + debug "setting owner of %s to %d:root" file uid; > + Unix.chown file uid 0 Hmm, doesn't this need parens around the 'then' clause? > (* Get the local user that libvirt uses to run qemu when we are > * running as root. This is returned as an optional string > @@ -205,8 +199,8 @@ let error_if_no_ssh_agent () = > (* Create the directory containing inX and outX sockets. *) >...