Skip to content
Prev 173407 / 398506 Next

Easy "Recall" to get ls(..., all.names=TRUE)?

On 12/03/2009, at 3:16 AM, Szumiloski, John wrote:

            
Does the following do what you want?

myls <- function (all.names=TRUE,pos=-1,...)
{
xxx <- pmatch(names(list(...)),"envir",nomatch=0)
if(length(xxx) && xxx>0) return(ls(all.names=all.names,pos=pos,...))
eee <- if(pos==-1) parent.frame() else as.environment(pos)
ls(all.names=all.names,envir=eee,...)
}

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}