Skip to content
Back to formatted view

Raw Message

Message-ID: <20050610192114.6be585d2.Achim.Zeileis@wu-wien.ac.at>
Date: 2005-06-10T17:21:14Z
From: Achim Zeileis
Subject: discovery (was: data.frame to character)
In-Reply-To: <39FDAD7D-80B1-40F2-AB22-5EBA92F79817@alum.calberkeley.org>

On Fri, 10 Jun 2005 11:59:07 -0500 Robert Citek wrote:

> How can one discover or list all available built-in objects?

Depends what you mean with `built-in'...
 
> On Jun 10, 2005, at 7:23 AM, Muhammad Subianto wrote:
> >> L3 <- LETTERS[1:3]
> >>  L10 <- LETTERS[1:10]
> 
> LETTERS is apparently a built-in character vector.  ls() and objects 
> () only lists the ones I've created. 

More precisely, it lists the objects in the global environment.

> Is there a function that lists  all available built-in objects?

R> search()

will show you the search path and in particular all packages that are
currently attached. Using

R> ls("package:base")

you could list all objects in the base packages which includes LETTERS.

> For example, "pi" is another built-in, but "e" is not. 

But "exp" is. So 

R> exp(1)

will give you "e".
Z

> A means to  
> list them would be nice.
> 
> Regards,
> - Robert
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>