similar to: unexpected behaviour when defining a function

Displaying 20 results from an estimated 60000 matches similar to: "unexpected behaviour when defining a function"

2017 May 11
1
R-3.3.3/R-3.4.0 change in sys.call(sys.parent())
Here is a case where the current scheme fails: > with(datasets::mtcars, xyplot(mpg~wt|gear)$call) xyplot(substitute(expr), data, enclos = parent.frame()) Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, May 11, 2017 at 1:09 AM, Deepayan Sarkar <deepayan.sarkar at gmail.com> wrote: > On Wed, May 10, 2017 at 2:36 AM, William Dunlap via R-devel > <r-devel at
2018 Jan 24
1
glob exclude vs include behaviour
not a bug, buy colour me confused: /tmp/foo$ mkdir a /tmp/foo$ touch a/foo /tmp/foo$ touch a/.baz /tmp/foo$ cd .. /tmp$ rsync -avP --exclude=a/* foo bar sending incremental file list created directory bar foo/ foo/a/ sent 71 bytes received 20 bytes 182.00 bytes/sec total size is 0 speedup is 0.00 /tmp$ ls -la bar total 20 drwxr-xr-x 3 user user 4096 Jan 24 14:17 . drwxrwxrwt 70 root
2007 Feb 24
2
barchart (lattice) with text labels
I would like to place the value for each bar in barchart (lattice) at the top of each bar. Something like the following code produces. library(lattice) mypanelfunc <- function(x, y, ...) { panel.barchart(x, y, ...) panel.text(x, y, labels=as.character(round(x,2)), ...) } myprepanelfunc <- function(x, y, ...) list(xlim=c(0, max(x)+.1)) mydata <- expand.grid(a=factor(1:5),
2014 Jun 02
3
[LLVMdev] -fvisibility=hidden, and typeinfo, and type-erasure
[Was initially posted on cfe-users, sorry.] Hi, I'm sorry my message is quite long, the TL;DR version is "g++ and clang++ seem to have different opinions on how RTTI, templates, and ELF visibility should interact". I can't tell whether this is a bug or not: I have found no relevant documentation that could help me decide whether this behavior is meant, or not. All I can say
2018 Mar 16
3
cat(fill=N)
Hi all, I expect I'm getting something wrong, but cat("foo bar baz foo bar baz foo bar baz", fill = 10) should be broken into lines of width 10, whereas I get: > cat("foo bar baz foo bar baz foo bar baz", fill = 10) foo bar baz foo bar baz foo bar baz This is on R 3.4.3, but I don't see mentions of it fixed in 3.4.4 or r-devel NEWS. Cheers, David
2005 Mar 11
1
unexpected behaviour of expression(sum())
I'm seeing inconsistent symbols from the same expression with the following code: expr = expression(sum(x, 1, n)) plot(1, main = expr, type = "n") text(1, 1, expr) Moreover, the inconsistency is reversed in r-devel compared to R 2.0.1. In particular, the main label shows a \bigoplus instead of \sum in r-devel, and the other way round in 2.0.1. demo(plotmath) shows \sum in
2010 Apr 23
1
help in conditional histogram
Dear Dr. Sarkar, When I try to run the codes, I found the following problem: > h<- sample(1:14, 319, rep=T) > c<- sample(1:14, 608, rep=T) > n<- sample(1:14, 1140, rep=T) > vt<-c(h, c, n) > ta<-rep(c("h", "c", "n"), c(319, 608, 1140)) > > to<-data.frame(vt,ta) > library(lattice) Attaching package: 'lattice'
2007 Dec 24
2
Build a cmdline for exec from optional parameters
How can I do this?: foo { name: $bar => "frob" } define foo( $bar = false, $baz = false ) { if #$bar and $baz both defined $cmd = "frobnicate --bar=$bar --baz=$baz ${name}" else if #$bar defined $cmd = "frobnicate --bar=$bar ${name}" else if #$baz defined $cmd = "frobnicate --baz=$baz ${name}" else
2006 Apr 01
2
barchart in black & white with 10 categories?
Dear list, I am trying to plot a barchart (from lattice) in B & W, with 10 categories per bar. It seems that the colours are recycled after reachingcategory number 7, which creates a problem interpreting the chart. I therefore have two questions: 1) How do I get more shades? 2) Does anyone have a theme to share with me with distinctive shades in Black & White? Thankful for all the
2009 Jul 26
1
Need help of exclusion options in rsync-3.0.6
Hi, I have a situation where I want to delete some of my excluded patterns but still want to preserve some other. For example consider below source and destination directory hierarchy. Source Dest ---------- --------- /foo/bar/ /foo/bar/ | -> baz | -> baz | -> xyz | -> xyz | ->
2009 May 02
1
The --relative option on remote machine to source machine ???
Hi, I read below lines in rsync v3.0.5 for --relative option. if you used this command: rsync -av /foo/bar/baz.c remote:/tmp/ ... this would create a file named baz.c in /tmp/ on the remote machine. If instead you used rsync -avR /foo/bar/baz.c remote:/tmp/ then a file named /tmp/foo/bar/baz.c would be created on the remote machine, preserving its full path It is also possible to limit the
2006 May 02
2
Bug: invalid nesting of inline markup across link labels
Hi John, there?s a bug in Markdown.pl: [foo*bar](#) [baz*quux](#) This expands to the following: <p><a href="#">foo<em>bar</a> <a href="#">baz</em>quux</a></p> Those `*` should either be disregarded or the tags should nest correctly: 1. <p><a href="#">foo*bar</a> <a
2007 May 23
2
Markdown generates invalid html for a list immediately followed by a quote
Howdy, [Please preserve the CC to 424919-forwarded at bugs.debian.org on any replies.] The following bug in Markdown was reported to the Debian bug tracking system. In short, running both the released version of Markdown and the latest beta on * foo > bar > baz produces invalid HTML. ----- Forwarded message from Joey Hess <joeyh at debian.org> ----- From: Joey Hess <joeyh
2014 Aug 26
2
[LLVMdev] llvm-objdump
Hi Kev, I'm glad to hear llvm-objdump is getting attention. I'm unclear on how much output specialization one could (or should) do for ELF vs. Mach-O. If you're game, let's compare an example: $ cat labeltest.s .text foo: nop bar: bum: nop jmp bar jmp bum jmp baz nop baz: nop Assembling for x86 and llvm-objdump'ing, i get $ llvm-mc
2000 Dec 15
1
Preserving argument splitting with SSH
I'm using: % ssh -V SSH Version OpenSSH-1.2.3, protocol version 1.5. Compiled with SSL. % uname -a Linux gellar 2.2.13 #1 SMP Wed Dec 29 14:07:41 PST 1999 i686 unknown and am wondering whether it's a fundamental shortcoming of the SSH protocol that argument splitting is not preserved from client to server, but instead the argument list is re-split on whitespace. E.g., from my machine
2012 Oct 13
1
[LLVMdev] Accessing merged globals through PointerType
Hi, I am trying to create a pass that is similar to the GlobalMerge code found here: http://llvm.org/docs/doxygen/html/GlobalMerge_8cpp_source.html I am concerned with lines 149-163 of the above file. From the documentation at the top of the file, it will convert this: static int foo[N], bar[N], baz[N]; for (i = 0; i < N; ++i) { foo[i] = bar[i] * baz[i]; } Into something like this
2013 Jan 08
0
[LLVMdev] LTO "bug" and Clang warnings
Hi Renato, On 08/01/13 17:16, Renato Golin wrote: > After looking at the Livermore for a while, we found the issue that was causing > LTO to produce a different result. > > Consider the code below [1]. setup() doesn't touch bar/baz, main() doesn't > reference foo. LTO finds, correctly, I don't think this is correct. At the LLVM IR level it is valid to write into bar
2008 Jun 04
3
how to automatically create objects with names from a string list?
Suppose I have a string of objects names: name <- c("foo", "bar", "baz") and I would like to use a for loop to automatically create three objects called "foo", "bar" and "baz" accordingly. Then how can this be done" (so that in the workspace, foo = 1, bar = 2 and baz=3) for (i in name) { ..... } Thanks! Mark
2006 Oct 22
1
Getting hold of a package's environment from C code
Hi, I have a package where I'm calling an R function (say "foo") from C code. "foo" is in the same package, but is not exported. I construct the call using lang1(install("foo")), but to eval it I need the package's environment. Is there a way to do this? Passing the correct environment through .Call() is not an option. Right now, I'm getting the
2017 Jan 08
2
IRC question about ?foo etc
14:50 < cbosdonnat> pino|work, do you know how I could get ?tar passed from one function to the other in the checksum code? 14:51 < pino|work> cbosdonnat: pass it as it is, ie ?foo 14:52 < cbosdonnat> pino|work, indeed, works better... I didn't know I could use the ? in the calling function and I used the ~ instead 14:53 < pino|work> ? is handled like an option type