Skip to content
Back to formatted view

Raw Message

Message-ID: <C224A7AE-7571-4396-BEB4-E52FD743828C@comcast.net>
Date: 2012-11-06T19:40:39Z
From: David Winsemius
Subject: For the function loc()
In-Reply-To: <CAM_vju=S4=edv-ZfZpRpvp1AEqzmsTLz3w0ddaL7aaLywWNjMg@mail.gmail.com>

On Nov 6, 2012, at 10:50 AM, Sarah Goslee wrote:

> rseek.org is a good place to start for locating functions.
> 
> We might be better able to help if you'd told us where you got that
> code in the first place.
> 
> On Tue, Nov 6, 2012 at 8:53 AM, yuyaxuan <309772486 at qq.com> wrote:
>> Hello guys,
>> 
>> I am wondering that whether we have the function loc() in R package??? If
>> so, which one should I install?
>> For example, "locrow = loc(row!=0.0)" I met this in the code...I checked the
>> code,, But I didn't find the self defined function..

@yuyaxuan <309772486 at qq.com>

That code looks dangerous. I guessing it was written by an inexperienced R programmer and that 'loc' is a synonym for `which`. You should not be testing or equality of floating point numbers .... read the FAQ.

I searched using findFn in the sos package, and could not find such a function, so my guess is that it was defined in the preceding code that you have not shown.

-- 

David Winsemius, MD
Alameda, CA, USA