search for: foo1

Displaying 20 results from an estimated 255 matches for "foo1".

Did you mean: foo
2006 Jul 02
4
Test for argument in ...
Hello! Say I have a function foo1, which has argument ... to pass various arguments to foo2 i.e. foo1 <- function(x, ...) { foo2(x, ...) } Say that foo2 accepts argument arg1 and I would like to do the following: - if foo1 is called as foo1(x) then I would like to assign some value to arg1 inside foo1 before calling foo2 ar...
2010 Apr 27
1
suggestion on method dispatch
Dear all, I have define a function and its methods as follows: ######## beginning of code fn <- function(x,...){ UseMethod("fn") } fn.foo1 <- function(x, commonA=1, ...){ print("fn.foo1 is called.") } fn.foo2 <- function(x, uniqueFoo2, common=1, ...){ ## uniqueFoo2 is a unique argument in fn.foo2 x <- uniqueFoo2; class(x) <- "foo1" ## use uniqueFoo2 to generate a object of class foo1 dots <- list(.....
2012 Apr 27
2
[LLVMdev] complex library functions (creal and cimag)
When I compile this code which includes call to crealf, $ cat foo1.c #include <complex.h> float foo1(complex float z) { return crealf(z); } clang emits a call to crealf, $ clang foo1.c -S -o - -O3 foo1: # @foo1 .cfi_startproc # BB#0: # %entry jmp crealf # TAILCA...
2005 Apr 21
1
[LLVMdev] a packed constant cannot be referenced in the arithmetic instruction?
%foo1 = constant <4 x float> <float 1.0, float 2.0, float 3.0, float 4.0>; void %main() { %x = mul <4 x float> %foo1, %foo1 ret void } llvm-as complained " Reference to an invalid definition: 'foo1' of type '<4 x float>' ". I searched all test...
2006 Apr 11
2
About list to list - thanks
Thank you very much for your useful suggestions. These are exactly what I was looking for. foo <- list(foo1, foo2, foo3) lapply(foo, function(x) matrix(unlist(x), nrow = length(x), byrow = TRUE)) or lapply(foo, function(x) do.call('rbind', x)) Best, Muhammad Subianto On 4/11/06, Muhammad Subianto <msubianto at gmail.com> wrote: > Dear all, > I have a result my experiment like this b...
2010 Nov 15
2
How to move an internal function to external keeping same environment?
Hi I have within a quite big function foo1, an internal function foo2. Now, in order to have a cleaner code, I wish to have the internal foo2 as "external". This foo2 was using arguments within the foo1 environment that were not declared as inputs of foo2, which works as long as foo2 is within foo1, but not anymore if foo2 is...
2006 Apr 11
2
About list to list
Dear all, I have a result my experiment like this below (here my toy example): foo1 <- list() foo1[[1]] <- c(10, 20, 30) foo1[[2]] <- c(11, 21, 31) foo2 <- list() foo2[[1]] <- c(100, 200, 300) foo2[[2]] <- c(110, 210, 310) foo3 <- list() foo3[[1]] <- c(1000, 2000, 3000) foo3[[2]] <- c(1100, 2100, 3100) list(foo1,foo2,foo3) The result: > list(foo1,...
2011 Jul 01
4
require => Class
Hi I have been trying to use class dependency and had no luck so far. following are the two classes i am trying to use [root@puppet]#cat libreoffice.pp class libreoffice { case $hostname { "foo": { package { "libreoffice": ensure => present, require => Class["foo1"] } } } } [root@puppet]#cat foo.pp class foo1 { package { "openoffice.org-core": ensure => absent, } } When i run puppetd on client i get the error message Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class foo1 at /etc/puppet/mani...
2015 Dec 17
2
Multiple IPs and hostname
Hi, I'm running postfix as SMTP-server and dovecot as IMAP-server. The server has multiple IPs, and postfix is configured that every domain is using a separate IPv4-address. Examle: foo1.com --> 11.22.33.44 foo2.com --> 22.33.44.55 foo3.com --> 33.44.55.66 bar.org --> 66.77.88.99 The hostname of the server is: mail.bar.org Now I have a request from one of my customers, who is using 3 different domains: - foo1.com - foo2.com - foo3.com If he receives a mail t...
2014 May 02
1
Authors@R: and Author field
Hi to all Authors@R: c(person("fooa","foob", role = c("aut","cre"), email = "fooa.foob@fooc.de"), person("foo1","foo2", role = c("ctb"), email = "foo1.foo2@foo3.de")) Author: fooa foob, with contributions from foo1 foo2 using r CMD check --as-cran .. (R 3.1 and Windows) I get an error Author field differs from that derived from Authors@R Author: &...
2018 Apr 05
1
potential file.copy() or documentation bug when copy.date = TRUE
This is a recent R-devel. file.copy() is not vectorized if multiple destinations succeed: cat("foo1\n", file = "foo1") cat("foo2\n", file = "foo2") unlink(c("copy1", "copy2"), recursive = TRUE) file.copy(c("foo1", "foo2"), c("copy1", "copy2"), copy.date = TRUE) #> Error in Sys.setFileTime(to[okay],...
2008 Oct 05
1
plyr package: passing further arguments fail
Dear list and Hadley, The new plyr package seems to provide a clean and consistent way to apply a function on several arguments. However, I don't understand why the following example does not work like the standard mapply, library(plyr) df <- data.frame(a=1:10 , b=1:10) foo1 <- function(a, b, cc=0, d=0){ a + b + cc + d } mdply(df, foo1, cc=1) # fine mdply(df, foo1, d=1) # fails mdply(df, foo1, cc=1, d=2) # fails mapply(foo1, a=df$a, b=df$b, MoreArgs=list(cc=1)) mapply(foo1, a=df$a, b=df$b, MoreArgs=list(d=1)) mapply(foo1, a=df$a, b=df$b, MoreArgs=list(cc=...
2008 Mar 25
1
Passing (Optional) Arguments
Dear List: In short, I am writing a number of functions as building blocks for other functions and have some questions about scoping and passing arguments. Suppose I have functions foo1, foo2, and foo3 such that: foo1<-function(a=1,b=TRUE,c=FALSE){#do stuff}; foo2<-function(x=1,y=FALSE,z=c(1,2,3,4)){#do stuff}; foo3<-function(lambda,...){lambda*foo1()*foo2()}; I want to be able to pass a,b,c,x,y,z to the functions foo1 and foo2 though foo3 (whether I define default...
2010 Mar 15
2
Strange behavior of assign in a S4 method.
...hange an object without assignation (foo(x) and not x<-foo(x)) using deparse and assign. But when the argument of the method does not match *exactly* with the definition of the generic function, assign does not work... Anything wrong? Christophe #------ Does not work ------# setGeneric("foo1",function(x,...){standardGeneric("foo1")}) setMethod(f="foo1",signature="numeric",definition= function(x,y=1,...){ nameX<-deparse(substitute(x)) x <- x^2 assign(nameX,x,envir=parent.frame()) } ) e <- 3 foo1(e,y=5) cat(e)...
2012 Oct 17
1
Do *not* pass '...' to NextMethod() - it'll do it for you; missing documentation, a bug or just me?
...de now, I think I managed to overlook/avoid the following pitfall when using NextMethod(): If you explicitly pass argument '...' to NextMethod(), you will effectively pass those argument twice to the "next" method! EXAMPLE: foo0 <- function(...) UseMethod("foo0"); foo1 <- function(...) UseMethod("foo1"); foo2 <- function(...) UseMethod("foo2"); foo2.A <- foo1.A <- foo0.A <- function(object, a=1, b=2, c=3, d=4, ...) { str(c(list(object=object, a=a, b=b, c=c, d=d), list(...))); } ## CORRECT: Don't pass arguments '......
2005 Jan 30
3
trellis graphics in loops
I have this awkward problem with trellis (lattice). I am trying to generate some plots through loops but the .eps file is empty. When I generate them in a list and print them outside the loop all is fine. this is an example below:( nothing shows up in foo.eps, but all show up in foo1.eps) R vesion 2.0.1, lattice version 0.10-16, on a debian 2.6.8-1 kernel. X <- data.frame(x=rnorm(10000), y=rnorm(10000), z=sample(c("foo1","foo2"), 10000,replace=T), year=sample(c(89:94), 10000,replace=T)) trellis.device("postscript", file="foo.eps") f...
2012 Apr 27
0
[LLVMdev] complex library functions (creal and cimag)
On Fri, Apr 27, 2012 at 12:09 PM, Akira Hatanaka <ahatanak at gmail.com> wrote: > When I compile this code which includes call to crealf, > > $ cat foo1.c > #include <complex.h> > > float foo1(complex float z) { return crealf(z); } > > clang emits a call to crealf, > > $ clang  foo1.c -S -o - -O3 > foo1:                                   # @foo1 >     .cfi_startproc > # BB#0:                                 # %en...
2014 Dec 08
2
CRAN packages mis-using \donttest : falsy
..., 2014 at 3:32 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: [...] > Why not declare colorspace as a "Suggests:" kind of dependency? I guess that is a solution. :/ In another example in the 'disposables' package I have: \donttest{ pkg <- make_packages( foo1 = { f <- function() print("hello!") ; d <- 1:10 }, foo2 = { f <- function() print("hello again!") ; d <- 11:20 } ) foo1::f() foo2::f() foo1::d foo2::d dispose_packages(pkg) } So in this case should I suggest 'foo1' and 'foo2'? Gab...
2001 Jul 08
1
Scatter plotting
R List: I have a bunch of very small eps files that I want to use as plotting symbols. That is, I want to position them as a scatter plot in an x,y space. Is it possible to identify a plotting symbol for each point in R? Thanks in advance. __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
2001 Jul 08
1
Scatter plotting
R List: I have a bunch of very small eps files that I want to use as plotting symbols. That is, I want to position them as a scatter plot in an x,y space. Is it possible to identify a plotting symbol for each point in R? Thanks in advance. __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/