similar to: Printing of anonymous functions in calls is sub-optimal

Displaying 20 results from an estimated 10000 matches similar to: "Printing of anonymous functions in calls is sub-optimal"

2011 Dec 31
4
Base function for flipping matrices
Hi all, Are there base functions that do the equivalent of this? fliptb <- function(x) x[nrow(x):1, ] fliplr <- function(x) x[, nrow(x):1] Obviously not hard to implement (although it needs some more checks), just wondering if it had already been implemented. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/
2007 Feb 02
7
Coming Soon...
Dear spec''ers, As many of you already know, we''re gearing up for a pretty big 0.8 release of RSpec in the next couple of weeks. I''m writing in advance because I want to give you a heads up about upcoming changes and how they may impact your existing specs. Two important things to note first: 1. We will provide a translator that you''ll be able to use to
2012 Oct 11
2
simple parsing question?
I am using the getQuote function in the Quantmod package to retrieve the % change for a stock as follows: > getQuote("aapl",what=yahooQF(c("Change Percent (Real-time)"))) Trade Time %Change (RT) aapl 2012-10-11 03:41:00 N/A - -1.67% How can I extract the numeric "change %" which is being returned as a factor so that I can use it in other
2006 Mar 21
4
Using onSubmit tag in form_tag?
Hi guys, I have been working on a form that would use javascript to validate the data before submitting it, and from my view.rhtml I have a statement like this: However such a statement generates a HTML tag that looks like this: <form action="/users/Login?onSubmit=validate%28%29" method="post"> Seems like Rails thinks it is a parameter instead of an option, so
2007 May 10
2
Problem with translator
Hi, Just installed 0.9.4 (from 0.8 series) and ran the spec translator. It messed up specs that had the should include() where the argument to include is a string (using no parens for the arg) IOW, given: context "OldSchool" do class OldSchool attr_accessor collection def initialize @collection = [] end def add_new(item)
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
2017 Aug 11
2
Issues of R_pretty in src/appl/pretty.c
See https://stat.ethz.ch/pipermail/r-devel/2017-August/074746.html for the origin of the example here. That pretty(c(-1,1)*1e300, n = 1e9, min.n = 1) gave 20 intervals, far from 1e9, but pretty(c(-1,1)*1e300, n = 1e6, min.n = 1) gave 1000000 intervals (on a machine), made me trace through the code to function 'R_pretty' in https://svn.r-project.org/R/trunk/src/appl/pretty.c . *lo is
2013 Mar 23
4
Converting a character vector to numeric
Hello again, Let say I have following vector: Vec <- c("0.0365780769", "(1.09738648244378)", "(0.812507787221523)", "0.5778069963", "(0.452456601362355)", "-1.8900812605", "-1.8716093762", "0.0055217041", "-0.4769192333", "-2.4133018880") Now I want to convert this vector to numeric vector. I
2012 Jul 25
8
On Reproducible Code
We often refer requesters to the Posting Guide and chide them for not reading it. Recently I had occasion to re-read the Posting Guide which is for all R lists not just R-help. The word "reproducible" does not appear anywhere in the guide. The closest it comes is the following suggestion: "Sometimes it helps to provide a small example that someone can actually run."
2007 Feb 25
8
Double-banger function names: preferences and suggestions
What do you prefer/recommend for double-banger function names: 1 scale.colour 2 scale_colour 3 scaleColour 1 is more R-like, but conflicts with S3. 2 is a modern version of number 1, but not many packages use it. Number 3 is more java-like. (I like number 2 best) Any suggestions? Thanks, Hadley
2012 Sep 12
2
inline link syntax question
I don't believe this question has been discussed before on this list: Should whitespace be allowed between the bracketed and parenthesized parts of an inline link? For example, [foo] (/url) The markdown syntax documentation says explicitly that a space is allowed between the two parts of a *reference-style* link: > Reference-style links use a second set of square brackets, inside
2017 Aug 18
1
Issues of R_pretty in src/appl/pretty.c
Examples similar to pretty(c(-1,1)*1e300, n = 1e9, min.n = 1) with smaller 'n': pretty(c(-1,1)*1e304, n = 1e5, min.n = 1) pretty(c(-1,1)*1e306, n = 1e3, min.n = 1) A report on 'pretty' when working with integers, similar to what led to change of 'seq' fuzz, is https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=15137 -------------------------------------------- On Tue,
2014 Aug 21
3
Re: [PATCH] v2v: adding input -i ova
On Thu, Aug 21, 2014 at 01:50:18PM +0100, Richard W.M. Jones wrote: > + (* extract ova (tar) file *) > + let cmd = sprintf ("tar -xf %s -C %s") (ova) (dir) in Lots of extra parentheses here :-) The same command can be written more naturally without any of them: let cmd = sprintf "tar -xf %s -C %s" ova dir in However I think what you might have meant is to call
2009 Jan 19
1
sub and gsub treat \\ incorrectly (PR#13454)
Sub and gsub treat \\ replacement pattern incorrectly I expect sub("a","\\", "a", perl=T) to produce [1] "\" instead it generates [1] "" On the other hand, if I run sub("a","\\\\", "a", perl=T) it correctly outputs [1] "\\" The same issue applies to gsub. --please do not edit the information
2016 Jan 04
1
deparse with parentheses for SUBSET
Hi, maybe there?s a reason for it, but the discrepancy between the handling of `[` and `$` in deparsing seems odd to me: > substitute(a[1], list(a = quote(x * y))) x * y[1] > substitute(a$b, list(a = quote(x * y))) (x * y)$b The former is still executed in the right order (`*` first, then `[`), which is not what you?d expect looking at the deparse result. Some code that shows the execution
2004 Sep 10
1
FLAC 1.0.4 beta released
--- Miroslav Lichvar <lichvarm@phoenix.inf.upol.cz> wrote: > At first I had to remove parentheses in configure.in, line 208, > autoconf or m4 don't like it there. OK, it works for me but I will fix it as the parens are not necessary. > I tried tagging using metaflac with some iso-8859-2 chars, but these > chars were replaced by '#' chars, something wrong is here.
2017 Aug 03
2
Why LLVM doesn't have debug information of function right parentheses?
Simple Case: 1.int main() 2.{ 3. int i = 0; 4. return 0; 5.} compile command: clang -g a.c In LLVM IR, we have one attribute named "scopeLine" to indicate the left parentheses. But we don't have one attribute to indicate the right parentheses (line 5 in this example). So if we use gdb to debug it: (gdb) b main Breakpoint 1 at 0x100005c8: file a.c, line 3. (gdb) r Breakpoint
2017 Aug 03
3
Why LLVM doesn't have debug information of function right parentheses?
I have implemented this exact behavior in an out of tree LLVM fork I maintain, where one of my users needed this behavior, and it seems to work well. What we have done is extend the definition of DISubprogram to contain a new field "endLine" which holds the line number of the closing brace. A pass late in our backend uses this information to set the DebugLoc of return instructions in our
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
2001 Oct 07
1
Bug in Deriv? (PR#1119)
deriv seems to have problems with a minus-sign before a bracket. Below are four examples of the same function, the top one is wrong, all others are correct (hopefully). Rest of expression not shown, it is the same for all versions. _ platform i386-pc-mingw32 arch x86 os Win32 system x86, Win32 status major 1 minor 3.0 year 2001 month 06 day 22 language R