Displaying 20 results from an estimated 6453 matches for "substituting".
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
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:char...
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.call(plot, list(1:10, main =
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 <- substitute(expr, list(a=1)))
expr
# b) - whereas this
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)
function()a+1
Why did a suddenly reappear again
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=a) substitute(x$y))(list(y=1:3))
list(y = 1:3)$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 =
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
2020 Apr 30
2
Possible documentation problem/bug?
...*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 you look
closely. Let me quote the substitute page:
"Substituting and quoting often cause confusion when the argument is
expression(...). The result is a call to the expression constructor
function and needs to be evaluated with eval to give the actual expression
object."
So this appears to give a way to turn the arguments into a list -
eval(substitute(expr...
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 LOCALE...
2006 Dec 14
2
Samba PDC with Ldap, problems after restart
Hello, I have installed my Samba as a 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
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
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))
>> two <- function(a, b) list(a = substitute(a), b =
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'
....1 0.3 0.5 0.6 0.7 0.9
However, I haven't been able to work out a clever way of using
substitute to get the first part. I would like to be able to call, e.g.
with(fm, xyplot(resid(.) ~ carb))
and get a plot of resid(fm) ~ Formaldehyde$carb
It is possible to do the first part by deparsing, substituting, and
parsing but that's inelegant. Can anyone suggest a more elegant method?
BTW, the example of an lm model is just for illustration. The actual
use I have in mind is for lme (now lmer) models. The plot method for
the lme class in the nlme package does something very similar to this.
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 charset &...