similar to: R-help Digest, Vol 212, Issue 4

Displaying 20 results from an estimated 30000 matches similar to: "R-help Digest, Vol 212, Issue 4"

2024 Feb 06
2
NOTE: multiple local function definitions for ?fun? with different formal arguments
Thanks. Workarounds are interesting but... what's the point of the NOTE in the first place? H. On 2/4/24 09:07, Duncan Murdoch wrote: > On 04/02/2024 10:55 a.m., Izmirlian, Grant (NIH/NCI) [E] via R-devel > wrote: >> Well you can see that yeast is exactly weekday you have.? The way out >> is to just not name the result > > I think something happened to your
2024 Feb 06
1
[EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments
Because functions get called and therefore, the calling sequence matters. It?s just protecting you from yourself, but as someone pointed out, there?s a way to silence such notes. G From: Herv? Pag?s <hpages.on.github at gmail.com> Sent: Tuesday, February 6, 2024 2:40 PM To: Izmirlian, Grant (NIH/NCI) [E] <izmirlig at mail.nih.gov>; Duncan Murdoch <murdoch.duncan at gmail.com>;
2024 Feb 06
1
[EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments
Here's a dummy example that I think illustrates the problem: toto <- function() { if (runif(1) < 0.5) function(a) a else function(a,b) a+b } > fcn <- toto() > fcn(1,2) [1] 3 > fcn <- toto() > fcn(1,2) [1] 3 > fcn <- toto() > fcn(1,2) Error in fcn(1, 2) : unused argument (2) How can you use the returned function, if you get different arguments?
2024 Feb 04
1
NOTE: multiple local function definitions for ?fun? with different formal arguments
On 04/02/2024 10:55 a.m., Izmirlian, Grant (NIH/NCI) [E] via R-devel wrote: > Well you can see that yeast is exactly weekday you have. The way out is to just not name the result I think something happened to your explanation... > > toto <- function(mode) > { > ifelse(mode == 1, > function(a,b) a*b, > function(u, v, w) (u + v) / w) > } It's
2024 Feb 04
1
NOTE: multiple local function definitions for ?fun? with different formal arguments
Well you can see that yeast is exactly weekday you have. The way out is to just not name the result toto <- function(mode) { ifelse(mode == 1, function(a,b) a*b, function(u, v, w) (u + v) / w) } ________________________________ From: Grant Izmirlian <izmirlidroid at gmail.com> Date: Sun, Feb 4, 2024, 10:44 AM To: "Izmirlian, Grant (NIH/NCI) [E]"
2016 Jun 20
2
xxx not available for .C in package yyy
Hi R package developers. This is literally the strangest thing I've ever seen. Latest (as of a month ago) R under cygwin64. I'm teaching an intern package building and using the .C interface. The package compiles, but when it gets to "setting up lazy load" or some such it throws the error "triang" not available for .C() in package "randpkg". Upon checking,
2006 Oct 10
4
generate random numbers that sum up to 1
As I have previously asked, in response to a similar question: Is this a homework problem? cheers, Rolf Turner rolf at math.unb.ca
2007 Apr 12
1
LME: internal workings of QR factorization
Hi: I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For
2005 Nov 04
2
Classification Trees and basic Random Forest pkg using tree structures in C
Hello R-devel: I have written a package, called "woods", that does classification trees (R function CT), and currently, only the most basic functionality of Random Forest, e.g. bagged trees with choices about sample size, with/without replacement, size of (random) subset of covariates drawn when nodes are split. My reason for writing this is twofold. First, I wanted to base this
2005 Dec 23
1
can someone help me understand LAM/MPI and Rmpi for use on a cluster
I'm fairly astute at C and R but new to parallelization. Would someone be willing to provide help in the form of a simple example that parallelizes an R function from the inside of a C routine? If so, write me back at izmirlig at mail.nih.gov Thanks!
2024 Jan 29
0
DescTools::Quantile
It looks like a homework assignment. It also looks like you didn't read the documentation carefully enough. The 'len.out' argument in seq is solely for specifying the length of a sequence. The 'quantile' function omputes the empirical quantile of raw data in the vector 'x' at cumulative probabilit(y)(ies) given in the weights' argument, with interpolation I'm
2008 Jul 10
5
rounding
Hi, Round(0.55,1)=0.5 Round(2.55,1)=2.6 Can this be right? Thanks, Ed [[alternative HTML version deleted]]
2023 Mar 23
0
CentOS-announce Digest, Vol 212, Issue 4
Send CentOS-announce mailing list submissions to centos-announce at centos.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.centos.org/mailman/listinfo/centos-announce or, via email, send a message with subject or body 'help' to centos-announce-request at centos.org You can reach the person managing the list at centos-announce-owner at centos.org When
2020 Oct 14
0
R-help Digest, Vol 212, Issue 12
Dear Frauke, Thank you very much for taking the time to respond. You explanation was very helpful, and I now have that part figured out! Best Wishes, Dan Frauke Message: 3 Date: Mon, 12 Oct 2020 08:33:44 +0200 (CEST) From: =?UTF-8?Q?Frauke_G=C3=BCnther?= <guenther at leibniz-bips.de> To: "r-help at r-project.org" <r-help at r-project.org> Cc: William Michels <wjm1
2010 Feb 12
5
logical operations with lists
Sorry, maybe it's easy but I haven't found anything useful: how can I obtain a list C that contains all the members in the list B that are not in list A? This are lists of nanes, not numbers! Thank you Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical Oncology and Hematology, University of Genova, Genova, Italy Guest Researcher, LMP, NCI, NIH, Bethesda MD Work: 301-451-8575
2005 May 10
3
[LLVMdev] llvm fits in the national compiler infrastructure (nci)?
national compiler infrastructure - http://www.cs.virginia.edu/nci/ is there any on-going efforts to integrate llvm with other nci projects?
2012 Nov 15
0
R-devel Digest, Vol 117, Issue 13
Hi, > ... Wrong. It looks like internally a[[1]] is always used instead of a[[i]]. > The real problem it seems is that 'a' is treated as if it was of > ength 1: > > > mapply(function(x, y) {x * y}, a, 1:3) > [1] 101 202 303 > > mapply(function(x, y) {x * y}, a, 5) > [1] 505 > > In other words, internal dispatch works for [[ but not for length().
2005 Dec 09
2
segfault following a detach
Hello, first off, thanks for all of the previous help; hopefully someone will have some insight on this question. I am attempting to track down a segmentation fault which occurs only after a detach(2) is called in the code (I have replaced the detach(2) with detach(package:DSA) and that fails as well (furthermore, I have removed the detach calls and it does not segfault)). It has proved
2010 Apr 22
6
simple question
Hi how can I find, in a vector of characters, which is the most frequent one? Thanks Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical Oncology and Hematology, University of Genova, Genova, Italy Guest Researcher, LMP, NCI, NIH, Bethesda MD Work: 301-451-8575 Mobile: 301-204-5642 Email: zoppolig at mail.nih.gov
2011 Mar 04
1
[LLVMdev] LLVMdev Digest, Vol 81, Issue 5
Renato, On Mar 4, 2011, at 10:00 AM, llvmdev-request at cs.uiuc.edu wrote: > That's what the packed is for. > > %Base = type { i32, i8 }; // size = 8 > %POSDerived = type { %Base, i8 }; // i8 offset = 8, size 12 > > %Basep = packed type { i32, i8 }; // size = 5 > %nonPOSDerived = type { %Basep, i8 }; // i8 offset = 5, size 8 > > cheers, > --renato does't