Re: [R] listing all functions in R

2007-01-15 Thread Philippe Grosjean
Hello, First, regarding GeSHi syntax highlighting for R, I have done one for the R Wiki (plus the R function that generates the list of keywords automatically). I will attach it to a second email send privately to you, since the mailing list do not accept attachments. For the problem of keeping

Re: [R] listing all functions in R

2007-01-09 Thread Seth Falcon
Earl F. Glynn [EMAIL PROTECTED] writes: Prof Brian Ripley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here is a reasonable shot: findfuns - function(x) { if(require(x, character.only=TRUE)) { env - paste(package, x, sep=:) nm - ls(env, all=TRUE)

Re: [R] listing all functions in R

2007-01-09 Thread Earl F. Glynn
Seth Falcon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Are you sure you need to? I just tried your code above with: pkgs - c(Biobase, GOstats, flrblr, bazbaz) And while I see warning messages about the flrblr and bazbaz packages, the function completed and I get the expected

Re: [R] listing all functions in R

2007-01-08 Thread Earl F. Glynn
Prof Brian Ripley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Here is a reasonable shot: findfuns - function(x) { if(require(x, character.only=TRUE)) { env - paste(package, x, sep=:) nm - ls(env, all=TRUE) nm[unlist(lapply(nm, function(n) exists(n,

[R] listing all functions in R

2007-01-06 Thread Gavin Simpson
Dear List, I'm building an R syntax highlighting file for GeSHi [*] for a website I am currently putting together. The syntax file needs a list of keywords to highlight. How can I generate a list of all the functions in a base R installation? Ideally the list would be formatted like this:

Re: [R] listing all functions in R

2007-01-06 Thread Prof Brian Ripley
Could you tell us what you mean by - 'function' (if() and + are functions in R, so do you want those?) - 'a base R installation'? What is 'base R' (standard + recommended packages?) And on what platform: the list is platform-specific? Here is a reasonable shot: findfuns - function(x) {

Re: [R] listing all functions in R

2007-01-06 Thread Gavin Simpson
On Sat, 2007-01-06 at 13:48 +, Prof Brian Ripley wrote: Could you tell us what you mean by Thank you for your reply, Prof. Ripley. - 'function' (if() and + are functions in R, so do you want those?) I was thinking about functions that are used like this: foo() So I don't need things

Re: [R] listing all functions in R

2007-01-06 Thread Duncan Murdoch
On 1/6/2007 9:25 AM, Gavin Simpson wrote: On Sat, 2007-01-06 at 13:48 +, Prof Brian Ripley wrote: Could you tell us what you mean by Thank you for your reply, Prof. Ripley. - 'function' (if() and + are functions in R, so do you want those?) I was thinking about functions that are

Re: [R] listing all functions in R

2007-01-06 Thread Gabor Grothendieck
The arguments to the functions can differ too even if they exist on multiple platforms. system() on Windows has the input= argument but not on UNIX. On 1/6/07, Duncan Murdoch [EMAIL PROTECTED] wrote: On 1/6/2007 9:25 AM, Gavin Simpson wrote: On Sat, 2007-01-06 at 13:48 +, Prof Brian

Re: [R] listing all functions in R

2007-01-06 Thread Gavin Simpson
On Sat, 2007-01-06 at 10:43 -0500, Duncan Murdoch wrote: On 1/6/2007 9:25 AM, Gavin Simpson wrote: On Sat, 2007-01-06 at 13:48 +, Prof Brian Ripley wrote: Could you tell us what you mean by Thank you for your reply, Prof. Ripley. - 'function' (if() and + are functions in R, so

Re: [R] listing all functions in R

2007-01-06 Thread Gavin Simpson
On Sat, 2007-01-06 at 10:58 -0500, Gabor Grothendieck wrote: The arguments to the functions can differ too even if they exist on multiple platforms. system() on Windows has the input= argument but not on UNIX. That's a good point Gabor, and one I hadn't considered as yet. As I'm only just