Yes, it can cause problems. And speaking for myself, I'd say it's not
worth the risk, because it's easy enough to find alternative variable
names that are close enough to the notation of your formulas that
remembering should be no problem. For example, tt, cc, and mmatrix
might do it.
-Don
--
in R, and reuse variable names in
different
functions
On 03/02/2013 01:12 PM, Sarah Goslee wrote:
On Fri, Mar 1, 2013 at 7:06 PM, C W tmrs...@gmail.com wrote:
Thanks, that was just an example I came up with. I was just curious
if
using same variable names in different functions would cause
Duncan's comment may not qualify as a fortune, but it did make
me chuckle.
Peter Ehlers
On 2013-03-02 03:01, Duncan Murdoch wrote:
On 13-03-01 8:35 PM, C W wrote:
[...snip...]
pie is a function, but all it does is draw pie charts, so who cares if
you mask it? :-).
Duncan Murdoch
Well *I* think it should be a fortune!
cheers,
Rolf
On 03/03/2013 10:30 AM, Peter Ehlers wrote:
Duncan's comment may not qualify as a fortune, but it did make
me chuckle.
Peter Ehlers
On 2013-03-02 03:01, Duncan Murdoch wrote:
On 13-03-01 8:35 PM, C W wrote:
[...snip...]
Hi list,
I am writing several functions and running out variable names. I am using
words such as t, c, matrix to keep the notation same as formulas I am
using.
For example I have,
unnormalized - function(t, x, y){
val - rnorm(t, mean=x, var=y)
return(val)
}
metropolis - function(t, c,
On Mar 1, 2013, at 1:56 PM, C W wrote:
Hi list,
I am writing several functions and running out variable names. I am using
words such as t, c, matrix to keep the notation same as formulas I am
using.
For example I have,
unnormalized - function(t, x, y){
val - rnorm(t, mean=x,
Thanks, that was just an example I came up with. I was just curious if
using same variable names in different functions would cause problems.
Especially with reserved words.
Mike
On Fri, Mar 1, 2013 at 5:45 PM, David Winsemius dwinsem...@comcast.netwrote:
On Mar 1, 2013, at 1:56 PM, C W
On Fri, Mar 1, 2013 at 7:06 PM, C W tmrs...@gmail.com wrote:
Thanks, that was just an example I came up with. I was just curious if
using same variable names in different functions would cause problems.
No. The environment of a function is independent of other functions.
Especially with
On 03/02/2013 01:12 PM, Sarah Goslee wrote:
On Fri, Mar 1, 2013 at 7:06 PM, C W tmrs...@gmail.com wrote:
Thanks, that was just an example I came up with. I was just curious if
using same variable names in different functions would cause problems.
No. The environment of a function is
] On
Behalf
Of Rolf Turner
Sent: Saturday, March 02, 2013 5:01 AM
To: Sarah Goslee
Cc: r-help
Subject: Re: [R] using reserved words in R, and reuse variable names in
different
functions
On 03/02/2013 01:12 PM, Sarah Goslee wrote:
On Fri, Mar 1, 2013 at 7:06 PM, C W tmrs...@gmail.com wrote
-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf
Of Rolf Turner
Sent: Saturday, March 02, 2013 5:01 AM
To: Sarah Goslee
Cc: r-help
Subject: Re: [R] using reserved words in R, and reuse variable names in
different
functions
On 03/02/2013 01:12 PM, Sarah
11 matches
Mail list logo