Re: [R] [R-devel] Source Code for function

2019-09-10 Thread David Winsemius
an use positional matching. -- David. Thank you again, and I hope you have a wonderful week! Shelby From: Richard O'Keefe Date: Sunday, September 8, 2019 at 11:01 PM To: "Golden, Shelby" Cc: "Richard M. Heiberger" , Bert Gunter , "r-help@R-project.org&

Re: [R] [R-devel] Source Code for function

2019-09-10 Thread Golden, Shelby
erger" , Bert Gunter , "r-help@R-project.org" , "Gillenwater, Lucas" Subject: Re: [R] [R-devel] Source Code for function > I am looking to understand why the keyword function can take a logical > argument > (eg: x<4) and use that later inside the functi

Re: [R] [R-devel] Source Code for function

2019-09-08 Thread Richard O'Keefe
> > > > > On Fri, Sep 6, 2019 at 12:55 PM Golden, Shelby < > gold...@njhealth.org> > > > wrote: > > > > > >> Hello Bert, > > >> > > >> Thank you for the reply and your clarifications. Yes, it m

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Bert Gunter
t; > > >> > > >> > On Fri, Sep 6, 2019 at 10:14 AM Wang Jiefei < > szwj...@gmail.com> wrote: > >> > > >> > > If you are looking for an R code parser, I think the > `parse` and `eval` > >

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Golden, Shelby
>> > > > parse(text="function(x)message(x)") >> > > expression(function(x)message(x)) >> > > > eval(parse(text="function(x)message(x)")) >> > > function(x)message(x) >> > > >> &

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread peter dalgaard
ample below. >> > > >> > > > parse(text="function(x)message(x)") >> > > expression(function(x)message(x)) >> > > > eval(parse(text="function(x)message(x)")) >> > > function(x)message(x) >&

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Golden, Shelby
> > Best, > > > Jiefei > > > > > > On Fri, Sep 6, 2019 at 12:55 PM Golden, Shelby > > > wrote: > > > > > >> Hello Bert, > > >> &g

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread David Winsemius
> >> > >> Thank you for the reply and your clarifications. Yes, it might be helpful > >> to look into R’s formal grammar to see how “function” parses input to > >> delegate correct syntax. Is that accessible online? > >

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Golden, Shelby
To: "Golden, Shelby" Cc: "r-help@R-project.org" , "Gillenwater, Lucas" Subject: Re: [R] [R-devel] Source Code for function Hi Shelby, Not quite sure what you are trying to do. Mine might be off-topic but have you seen this document? http://adv-r.had.co.nz/Func

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Golden, Shelby
see how “function” parses input to > >> delegate correct syntax. Is that accessible online? > >> > >> Thank you, > >> Shelby > >> > >> > >> From: Bert Gunter > >> Date: Friday, September 6, 2019 at

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Richard M. Heiberger
; to look into R’s formal grammar to see how “function” parses input to > >> delegate correct syntax. Is that accessible online? > >> > >> Thank you, > >> Shelby > >> > >> > >> From: Bert Gunter > >> Date: Friday, September 6,

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Bert Gunter
ions. Yes, it might be helpful >> to look into R’s formal grammar to see how “function” parses input to >> delegate correct syntax. Is that accessible online? >> >> Thank you, >> Shelby >> >> >> From: Bert Gunter >> Date: Friday, September 6, 2019

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Wang Jiefei
nline? > > Thank you, > Shelby > > > From: Bert Gunter > Date: Friday, September 6, 2019 at 10:44 AM > To: "Golden, Shelby" > Cc: "r-help@R-project.org" , "Gillenwater, Lucas" < > gillenwat...@njhealth.org> > Subject: Re: [R]

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Wang Jiefei
Hi Shelby, Not quite sure what you are trying to do. Mine might be off-topic but have you seen this document? http://adv-r.had.co.nz/Functions.html#function-components It illustrates the components of a function. Best, Jiefei On Fri, Sep 6, 2019 at 11:52 AM Golden, Shelby wrote: > Hi all, >

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Golden, Shelby
: "Golden, Shelby" Cc: "r-help@R-project.org" , "Gillenwater, Lucas" Subject: Re: [R] [R-devel] Source Code for function 1. This is a plain text list; all html is stripped. So there is no red highlighting. 2. There is no "source code" for "func

Re: [R] [R-devel] Source Code for function

2019-09-06 Thread Bert Gunter
1. This is a plain text list; all html is stripped. So there is no red highlighting. 2. There is no "source code" for "function" -- it is a reserved keyword. Or are you looking for R's formal grammar -- e.g. how it parses input to determine correct syntax? Bert Gunter "The trouble with having

[R] [R-devel] Source Code for function

2019-09-06 Thread Golden, Shelby
Hi all, I have been attempting to access the source code for the keyword “function” to better understand how it assigns and stores logical inputs, like in the subset() [base] function. Does anyone know how I can access the source code for this? For example, if I have norm <- function(x){