Re: [R] A question about call()

2014-07-24 Thread super
Thanks a lot, it is much clear to me now, but i still have a question:The raw question is from:Hadley wickham's book advanced r programming, Chapter Meta programming, section expressions, in the part "Creating a call from its components"He said:To create a new call from its components, you ca

Re: [R] A question about call()

2014-07-24 Thread Duncan Murdoch
On 24/07/2014, 2:41 AM, super wrote: > The question is as below: > Exercises > 1.The following two calls look the same, but are actually different: > (a <- call("mean", 1:10)) > #> mean(1:10) This one creates a call where the first argument is a vector containing 10 elements. > (b <- call("mean

Re: [R] A question about call()

2014-07-24 Thread Jeff Newmiller
Please read the Posting Guide. There is a no HTML policy and a no homework policy. --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

[R] A question about call()

2014-07-23 Thread super
The question is as below: Exercises 1.The following two calls look the same, but are actually different: (a <- call("mean", 1:10)) #> mean(1:10) (b <- call("mean", quote(1:10))) #> mean(1:10) identical(a, b) #> [1] FALSE What¡¯s the difference? Which one should you prefer? So, how i can figure ou

[R] A question about call()

2014-07-23 Thread super
The question is as below: Exercises 1.The following two calls look the same, but are actually different: (a <- call("mean", 1:10)) #> mean(1:10) (b <- call("mean", quote(1:10))) #> mean(1:10) identical(a, b) #> [1] FALSE What¡¯s the difference? Which one should you prefer? So, how i can figure ou