[R] request if a variable is defined

Gabor Csardi csardi at rmki.kfki.hu
Tue Mar 4 16:50:46 CET 2008


Bingo!

See ?exists

G.

On Tue, Mar 04, 2008 at 04:38:31PM +0100, Paul Hammer wrote:
> hi members,
> 
> give it a function for requesting if a object, matrix, vector, variable 
> or whatever already exists?
> 
> e.g. if (*exists*(a) {print("yes") } else { print("no") }
> 
> thanks
> paul
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Csardi Gabor <csardi at rmki.kfki.hu>    UNIL DGM



More information about the R-help mailing list