Displaying 20 results from an estimated 2000 matches similar to: "NOTE: multiple local function definitions for ?fun? with different formal arguments"
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
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
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 07
1
[EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments
I put the idea below into a function that gives nicer looking results.
Here's the new code:
dupnames <- function(path = ".") {
Rfiles <- pkgload:::find_code(path)
allnames <- data.frame(names=character(), filename=character(), line
= numeric())
result <- NULL
for (f in Rfiles) {
exprs <- parse(f, keep.source = TRUE)
locs <-
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!
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,
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
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
2005 Nov 04
1
small bug in gl1ce, package lasso2 (PR#8280)
Full_Name: Grant Izmirlian
Version: 2.2.0
OS: SuSe Linux version 9.2
Submission from: (NULL) (156.40.34.177)
Sorry about the last submission, my bug-fix had an error in it because ifelse
doesn't vectorize. I'll repost with the correct bug-fix.
-------------------------------------------------------------------------------
The option exists to include all parameters, including the
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
2020 Jul 07
3
libssh2 is hanging during a file transfert
I'm trying to send data to a server with openssh 7.9p1, but it's hanging
somewhere.
the client stop at the line :
Jul 7 11:52:16 TOTO sshd[19553]: debug3: channel 0: will not send data
after close
and after 5 minutes the client closes the connection, why ?
This is the trace of the server openssh : ( DEBUG3 level)
Jul 7 11:52:15 TOTO sshd[31175]: debug3: fd 6 is not O_NONBLOCK
Jul
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
2008 Jul 30
1
model mix problem. FALSE CONVERGENCE
Hi R users
I try to use the lme but I can?t!!!!!
My script is (some words in french, sorry!!):
rm(list=ls(all=TRUE)) #Efface tous les objets en m?moire pour ?viter des
erreurs
library(MASS) #Chargement des Librairies
library(car)
library(Hmisc)
library(tkWidgets)
library(svDialogs)
library(multtest)
library(nlme)
#Rep <- "C:/Documents and Settings/U3M/Bureau/steph/Scripts
2003 Jul 15
3
How to read in data
Hello,
I'm new to R and in the process of testing it
My first question: I fail to read in my data (ANSI toto.txt file, tab separated)
> test <-read.table("toto.txt")
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file `toto.txt'
> test <-
2010 May 25
1
using the name of an argument in a function
Hi all,
In a function, I need to get the name of a variable that has been used to
call the function.
For example, I want:
--- 8< ------
toto <- 3
fun <- function(y){
nameOfY <-deparse(substitute(y))
cat("name is ",nameOfY)
}
fun(toto)
# [1] name is toto
--- 8< ----
But deparse(substitute(y)) does not work all the time, especially when we
use generic function.
2014 May 09
1
samba4 : [kerberos part kinit work but no kpasswd
hi,
?
i have recently installed a samba 4 in a DC role.
The distribution is a debian jessie/sid, the version of samba is 4.1.7.
The server is globally working but there is some litle trouble.
on the server itself, i can do a kinit without probleme but if i try a kpasswsd, i obtain the following
?
root at station:/var/log/samba# kinit
Password for administrator at TOTO.FR:
root at
2008 Oct 29
2
Problem using samba with ldap
Hello,
I've just installed samba with ldap on a debian etch.
I have a problem when i attempt to create a user with the command
smbldap-useradd -a -P -c "toto DUPONT" -u 1001 toto and to log in with it
after.
I obtain this error :
[2008/10/29 17:35:26, 0] passdb/pdb_get_set.c:pdb_get_group_sid(164)
pdb_get_group_sid: Failed to find Unix account for toto
[2008/10/29 17:35:26, 1]
2004 Aug 30
1
Pb when moved AD from win2000 to win2003 server
Hello,
I've a samba 3.0.2a on a mandrake 9.2 with double authentification. A
local authentification for users not on my domain and AD
authentification for users on my domain.
AD where on two win 2k servers.
One of these server was moved on win 2003 server and then the AD
authentification don't work any more.
Here is my smb.conf file.
getent passwd give only local users
[global]
2005 Feb 01
2
forcing a file to have the same uid from parent directory
Hi,
I have a little problem, sometimes the administrator must put a file in a
home directory. But the owner of this file is root, not the user which
have the home directory.
Example :
/rsrv/data1/home/toto toto Utilisateurs 0700
+ toto.id root Administrateurs 0700
+ fichier.xls toto Utilisateurs 0700
I would like to kown how I set up my