Gabor Grothendieck wrote:
This comes from the all.vars function and would indicate
a bug in that base R function.
hush! a user bug, i presume? but indeed,
all.vars(expression(foo(bar)()))
# character(0)
all.names(expression(foo(bar)()))
# foo bar
vQ
f = function(a) function()
Peter Dalgaard wrote:
Wacek Kusnierczyk wrote:
Gabor Grothendieck wrote:
This comes from the all.vars function and would indicate
a bug in that base R function.
hush! a user bug, i presume? but indeed,
all.vars(expression(foo(bar)()))
# character(0)
Wacek Kusnierczyk wrote:
(a) do not descend recursively into the function part (first element)
of a call
(b) do descend, unless it is a name
if it is a name, how would you descend?
By calling a recursive function which has it as the argument. It's not a
problem unless you want it to be
Wacek Kusnierczyk wrote:
Gabor Grothendieck wrote:
This comes from the all.vars function and would indicate
a bug in that base R function.
hush! a user bug, i presume? but indeed,
all.vars(expression(foo(bar)()))
# character(0)
all.names(expression(foo(bar)()))
# foo bar
Semantic
Peter Dalgaard wrote:
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk
th some additional boring pedantry wrt. ?gsubfn, which says:
If 'replacement' is a formula instead of a function then a one
line function is created whose body is the right hand side of
This comes from the all.vars function and would indicate
a bug in that base R function.
f = function(a) function() paste(a, a, sep=)
all.vars(~ fo(o)())
character(0)
On Tue, Feb 3, 2009 at 8:24 AM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Peter Dalgaard wrote:
Gabor
Wacek Kusnierczyk wrote:
But can you be sure that there is no legitimate reason for expecting
the current behaviour?
you surely know the answer.
Actually, I don't. I was just pointing out the generic risk of fixing
something that isn't broken by breaking something that works. There's a
Peter Dalgaard wrote:
Wacek Kusnierczyk wrote:
(a) do not descend recursively into the function part (first element)
of a call
(b) do descend, unless it is a name
if it is a name, how would you descend?
By calling a recursive function which has it as the argument. It's not
a problem
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk
th some additional boring pedantry wrt. ?gsubfn, which says:
If 'replacement' is a formula instead of a function then a one
line function is created whose body is the right hand side of the
formula and whose
On Sun, Feb 1, 2009 at 6:44 AM, Peter Dalgaard p.dalga...@biostat.ku.dk wrote:
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk
th some additional boring pedantry wrt. ?gsubfn, which says:
If 'replacement' is a formula instead of a function then a one
line
Peter Dalgaard wrote:
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk
th some additional boring pedantry wrt. ?gsubfn, which says:
If 'replacement' is a formula instead of a function then a one
line function is created whose body is the right hand side of
Wacek Kusnierczyk wrote:
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 4:46 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
to extend the context, if you were to solve the problem in perl, the
regex below would work in perl 5.10, but not in earlier
Thank you, it's perfect.
david
2009/1/30 Wacek Kusnierczyk waclaw.marcin.kusnierc...@idi.ntnu.no
David Hajage wrote:
Hello R users,
I have a string, for example:
x - \t\tabc\t def
This string can contain any number of tabulations. I want to replace each
tabulation of the begining
David Hajage wrote:
Thank you, it's perfect.
to extend the context, if you were to solve the problem in perl, the
regex below would work in perl 5.10, but not in earlier versions of
perl; another approach is to replace the unwanted leading characters
with equally many replacement characters
On Sat, Jan 31, 2009 at 4:46 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
David Hajage wrote:
Thank you, it's perfect.
to extend the context, if you were to solve the problem in perl, the
regex below would work in perl 5.10, but not in earlier versions of
perl;
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 4:46 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
David Hajage wrote:
Thank you, it's perfect.
to extend the context, if you were to solve the problem in perl, the
regex below would work in perl 5.10,
On Sat, Jan 31, 2009 at 6:01 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
Gabor Grothendieck wrote:
On Sat, Jan 31, 2009 at 4:46 PM, Wacek Kusnierczyk
waclaw.marcin.kusnierc...@idi.ntnu.no wrote:
David Hajage wrote:
Thank you, it's perfect.
to extend the context, if
Hello R users,
I have a string, for example:
x - \t\tabc\t def
This string can contain any number of tabulations. I want to replace each
tabulation of the begining of the string by the same number of space:
abc\t def
I'm trying to do this with gsub :
gsub(\t, , x) # replace every \t
[1]
David Hajage wrote:
Hello R users,
I have a string, for example:
x - \t\tabc\t def
This string can contain any number of tabulations. I want to replace each
tabulation of the begining of the string by the same number of space:
abc\t def
I'm trying to do this with gsub :
gsub(\t,
19 matches
Mail list logo