search for: substitut

Displaying 20 results from an estimated 6411 matches for "substitut".

Did you mean: substitute
2002 Jun 12
1
identical calls are not equal !?
Can please someone familiar with the R internals enlighten me on the following strange observation: # this is IDENTICAL as expected identical(substitute(substitute()), substitute(substitute())) # but NOT EQUAL !???? substitute(substitute()) == substitute(substitute()) # I originally found it on t2 <- function(e){ substitute(e) } t2(substitute(x==y, list(y=y)))[1] # I would expect all of the following to be equal !? t2(substitute(x==y,...
2006 Jan 23
2
net ads join segmentation fault
...et(111) Registered charset ISO-8859-1 [2006/01/23 12:36:59, 5] lib/iconv.c:smb_register_charset(103) Attempting to register new charset UCS2-HEX [2006/01/23 12:36:59, 5] lib/iconv.c:smb_register_charset(111) Registered charset UCS2-HEX [2006/01/23 12:36:59, 5] lib/charcnv.c:charset_name(81) Substituting charset 'US-ASCII' for LOCALE [2006/01/23 12:36:59, 5] lib/charcnv.c:charset_name(81) Substituting charset 'US-ASCII' for LOCALE [2006/01/23 12:36:59, 5] lib/charcnv.c:charset_name(81) Substituting charset 'US-ASCII' for LOCALE [2006/01/23 12:36:59, 5] lib/charcnv.c:c...
2007 Jul 16
2
substitute and expression
Hi, I'm trying to understand whether the use of substitute() is appropriate/documented for plotmath annotation. The following two calls give the same results: > plot(1:10, main = expression(alpha == 1)) > do.call(plot, list(1:10, main = expression(alpha == 1))) But not these two: > plot(1:10, main = substitute(alpha == a, list(a = 2))) > do...
2008 Jun 17
0
smbstatus error - Substituting charset 'UTF-8' for LOCALE
...egistered charset UTF-8 Attempting to register new charset ASCII Registered charset ASCII Attempting to register new charset 646 Registered charset 646 Attempting to register new charset ISO-8859-1 Registered charset ISO-8859-1 Attempting to register new charset UCS2-HEX Registered charset UCS2-HEX Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset...
2010 Nov 26
3
Calling substitute(expr, list(a=1)) when expr <- expression(a+b+c)
# The result I am after is the result after a substitution in an expression, such as substitute(expression(a+b+c), list(a=1)) expression(1 + b + c) # However, the way I want to do it is for a an expression "stored as a variable" as (expr <- expression(a+b+c)) expression(a + b + c) # a) The following does not work (expr2 <- substitut...
2004 Mar 18
12
substitute question
Consider the following example: # substitute a with b in the indicated function. Seems to work. > z <- substitute( function()a+1, list(a=quote(b)) ) > z function() b + 1 # z is an object of class call so use eval # to turn it into an object of class expression; however, # when z is evaluated, the variable a returns. > eval(z...
2000 Nov 08
1
substitute(x$y)) corrupts 'y' component (PR#731)
viz. > (function(x,y=a) substitute(x$y))(x) x$a > (function(x,y=a) substitute(x$y))(list(y=1:3)) list(y = 1:3)$a > (function(x,y) eval(substitute(substitute(y))))(x=list(y=1:3),y=x$y) list(y = 1:3)$x$y The behavior I expect and want is like that in Splus 3.4: > (function(x,y=a) substitute(x$y))(x) x$y > (function(x,y...
2005 Aug 23
2
Substituted arguments surviving multiple function calls
I am using R 2.1.1 and have written a function that will retrieve a named column from a data frame: d = data.frame(a1=c(4, 2), a2=c(6, 7)) f1 = function(x) { do.call("$", list(d, substitute(x))) } So this works: > f1(a1) [1] 4 2 However, I want to make another function, f2, which also accepts a column name as an argument and then calls the first function with it: f2 = function(x) { f1(substitute(x)) } However, this does not work: > f2(a1) Error in list(a1 = c(4, 2),...
2005 Jun 22
1
substitute in a named expression
I have a 'named expression' like expr <- expression(rep(1,d)) and would like to replace the argument d with say 5 without actually evaluating the expression. So I try substitute(expr, list(d=5)) in which case R simply returns expr which when I 'evaluate' it gives eval(expr) Error in rep.default(1, d) : invalid number of copies in rep() I've looked at ?substitute and ?expression (and other places) for ideas, but - well I guess there are some details which I...
2020 Apr 30
2
Possible documentation problem/bug?
...ke there is no obvious way in the documentation to convert the expressions in the dots argument to a list without evaluating them. Say, if you want to have a function that prints all its arguments: > foo(abc$de, fg[h], i) abc$de fg[h] i ...then converting them to a list would be helpful. Using substitute(...) was the first thing I tried, but that only gives the *first *argument in dots. It turns out that there is a way to do this, using substitute(...()), but this does not appear to be in either the substitute or the dots help page. In fact, there is a clue how to do this in the documentation, if...
2006 Feb 28
1
3.0.21c: idmap_rid segfaults on AIX 5.3 ML4
...egistered charset UTF-8 Attempting to register new charset ASCII Registered charset ASCII Attempting to register new charset 646 Registered charset 646 Attempting to register new charset ISO-8859-1 Registered charset ISO-8859-1 Attempting to register new charset UCS2-HEX Registered charset UCS2-HEX Substituting charset 'ISO8859-1' for LOCALE Substituting charset 'ISO8859-1' for LOCALE Substituting charset 'ISO8859-1' for LOCALE Substituting charset 'ISO8859-1' for LOCALE Substituting charset 'ISO8859-1' for LOCALE Substituting charset 'ISO8859-1' for LOCA...
2006 Dec 14
2
Samba PDC with Ldap, problems after restart
...PDC with LDAP Backend, it worked fine, I was able to join the Domain with a Windows XP Client.But Today when i started the server, i can't join a domain anymore. I also can't add users to ldap anymore with smbldap-tools i always get this failure message: 3444 Use of uninitialized value in substitution (s///) at /usr/share/perl5/smbldap_tools.pm line 140, <CONFIGFI LE> line 217. 3445 Use of uninitialized value in substitution (s///) at /usr/share/perl5/smbldap_tools.pm line 140, <CONFIGFI LE> line 218. 3446 Use of uninitialized value in substitution (s///) at /usr/share/perl5/smbld...
2013 May 16
3
Substitute / delayedAssign (was: Substitute unaware when promise objects are evaluated)
Duncan, Thank you for the clarification on how delayedAssign works. Should R-level interfaces to promise objects ever become available, I expect they would at time come in handy. On the subject of substitute and delayedAssign, I do have a follow-up question for the list. I'm trying to convert a named list of expression objects into an environment of promise objects. After conversion, each expression in the list will be automatically evaluated when the variable with the same name is accessed in the...
2018 Aug 13
2
substitute() on arguments in ellipsis ("dot dot dot")?
Interestingly, as.list(substitute(...())) also works. On Sun, Aug 12, 2018 at 1:16 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 12/08/2018 4:00 PM, Henrik Bengtsson wrote: >> >> Hi. For any number of *known* arguments, we can do: >> >> one <- function(a) list(a = substitute(a))...
2020 Oct 05
2
understanding as.list(substitute(...()))
Could someone explain what is happening with the ...() of the following function: dots <- function(...) as.list(substitute(...())) I understand what I'm getting as a result but not why. ?dots and ?substitute leave me none the wiser. regards Tim
2014 May 07
0
Urgent Problem with failed new User Login to computers on Samba AD Domain
...egistered charset UTF-8 Attempting to register new charset ASCII Registered charset ASCII Attempting to register new charset 646 Registered charset 646 Attempting to register new charset ISO-8859-1 Registered charset ISO-8859-1 Attempting to register new charset UCS2-HEX Registered charset UCS2-HEX Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset 'UTF-8' for LOCALE Substituting charset...
2018 Aug 12
3
substitute() on arguments in ellipsis ("dot dot dot")?
Hi. For any number of *known* arguments, we can do: one <- function(a) list(a = substitute(a)) two <- function(a, b) list(a = substitute(a), b = substitute(b)) and so on. But how do I achieve the same when I have: dots <- function(...) list(???) I want to implement this such that I can do: > exprs <- dots(1+2) > str(exprs) List of 1 $ : language 1 + 2 as well as: &...
2011 Sep 07
2
Using substitute on a function parameter
Hello, I would like to write a function where substitute operates on the parameter, but ... > Expression = function(o,l) substitute(o, l) > Expression({x=.(FOO)}, list(FOO=2)) o How do i get substitute to work on the contents of o. Regards Saptarshi
2005 Apr 02
2
An exercise in the use of 'substitute'
I would like to create a method for the generic function "with" applied to a class of fitted models. The method should do two things: 1. Substitute the name of the first argument for '.' throughout the expression 2. Evaluate the modified expression using the data argument to the fitted model as the first element of the search list. The second part is relatively easy. The default method for "with" has body eval(substi...
2005 Jan 23
1
Winbind without netbios
...charset UTF-8 Attempting to register new charset ASCII Registered charset ASCII Attempting to register new charset 646 Registered charset 646 Attempting to register new charset ISO-8859-1 Registered charset ISO-8859-1 Attempting to register new charset UCS2-HEX Registered charset UCS2-HEX Substituting charset 'ANSI_X3.4-1968' for LOCALE Substituting charset 'ANSI_X3.4-1968' for LOCALE Substituting charset 'ANSI_X3.4-1968' for LOCALE Substituting charset 'ANSI_X3.4-1968' for LOCALE Substituting charset 'ANSI_X3.4-1968' for LOCALE Substituting charse...