On May 15, 2012, at 07:25 , R. Michael Weylandt wrote:
> The only place I know lazy evaluation really is visible and widely
> used is in the passing of function arguments. It's what allows magic
> like
>
> zz <- 1:5
> plot(zz)
>
> to know your variable was called "zz."
This is actually *not* l
> Oh, what is this world coming to when you can't count on laziness to
> be lazy. ;) I should probably stop reading about Haskell and their
> lazy way of doing things.
Haskell would still have to check an infinite number of potential files on
your hard disk, because it can't now when it's seen
The only place I know lazy evaluation really is visible and widely
used is in the passing of function arguments. It's what allows magic
like
zz <- 1:5
plot(zz)
to know your variable was called "zz." It can also show up in some
places through the promise mechanism, but you have to do a little bit
Thank you all for the replies.
On Mon, May 14, 2012 at 2:45 PM, R. Michael Weylandt
wrote:
> R is lazy, but not quite that lazy ;-)
Oh, what is this world coming to when you can't count on laziness to
be lazy. ;) I should probably stop reading about Haskell and their
lazy way of doing things.
R is lazy, but not quite that lazy ;-)
It's likely much easier to do this with regexps
something like
list.files()[grepl(paste0(filename, "-"[0123456789]+""), list.files())]
Michael
On Mon, May 14, 2012 at 3:34 PM, J Toll wrote:
> Hi,
>
> I have a question involving Inf, lazy evaluation, and
?list.files
-- Bert
On Mon, May 14, 2012 at 12:34 PM, J Toll wrote:
> Hi,
>
> I have a question involving Inf, lazy evaluation, and maybe argument
> recycling. I have a directory where I am trying to check for the
> existence of files of a certain pattern, basically something like
> "filename-
Hi,
I have a question involving Inf, lazy evaluation, and maybe argument
recycling. I have a directory where I am trying to check for the
existence of files of a certain pattern, basically something like
"filename-#", where # is an integer. I can do something like this,
which works.
file.exists
7 matches
Mail list logo