[Babase] Samples/neighbors error when attempting to censor males
Niki Learn
nlearn at princeton.edu
Wed Jan 20 10:46:25 EST 2010
-----Original Message-----
From: babase-bounces at eeblistserv.Princeton.EDU
[mailto:babase-bounces at eeblistserv.Princeton.EDU] On Behalf Of Karl O. Pinc
Sent: Tuesday, January 19, 2010 4:12 PM
To: The Baboon Database Project
Subject: Re: [Babase] Samples/neighbors error when attempting to censor
males
On 01/19/2010 01:11:55 PM, Niki Learn wrote:
> ERROR: DIG: BIOGRAPH.Statdate cannot be less than SAMPLES.Date
> unless
> NEIGHBORS.Sname individual is alive
>
> ERROR: LUI: BIOGRAPH.Statdate cannot be less than SAMPLES.Date
> unless
> NEIGHBORS.Sname individual is alive
> So I looked these guys up in samples and Luigi didn't even have an
> entry.
> Meanwhile Digit had many entries but his last entry was for 25 Aug
> 2007,
> which matches his last census entry and current statdate. I am
> trying
> to
> change his statdate to a censordate of 27 Aug 2007, which is NOT less
> than
> the last samples date. Neighbors doesn't even have dates. I'm not
> real
> familiar with how those tables interact so I don't know where else to
> look
> for whatever is causing this error.
The place to look is the social interactions ER diagram on page
10 of the pocket reference.
DIG is a neighbor of DIB as of 2008-10-13, so you can't "stop his
existance" after 27 Aug 2007, which is what setting his Statdate
back would do, when his Status is not 0 (alive). I presume you're
also changing his Status to 2 (censored).
select samples.date, samples.sname, neighbors.sname, neighbors.ncode
from samples, point_data, neighbors
where neighbors.sname = 'DIG'
and neighbors.pntid = point_data.pntid
and point_data.sid = samples.sid
order by samples.date desc, samples.stime desc;
We could change the rules for Status = 2 (censored) but
I don't think we really want to. (Right?)
The error message is not the best. The key indicator
is that it talks about NEIGHBORS.Sname as the problematic
column. I'd be happy to come up with a better message
but suspect this is a systemic problem. I'm
(very likely) using the same error message you'd get
if you messed around in the NEIGHBORS table
and have probably written error messages in this
fashion all over the system. Anyhow, suggestions
are welcome.
I didn't look at LUI but I suspect something similar.
If he's still a problem let me know and please tell
me exactly what it was you were trying to do when
you got the error. (I know your brain is running
on empty at times these days.)
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
NIKI WRITES:
Okay - that's a lot of typing to find out who someone's neighbor is. Should
we have a view for that or something?
I'm still confused as to how DIG (or any others) could be listed as another
baboon's neighbor after he has stopped showing up in the census. So Digit
was last censused on 25 Aug 2007 but according to the output of Karl's code
he was someone's neighbor 18 times after that in September 2007 and
September and October 2008. How is this possible? And why isn't it
reflected in his statdate?
2008-10-13 | DIB | DIG | 1
2008-10-13 | DIB | DIG | 1
2008-10-13 | DIB | DIG | 1
2008-09-18 | VIN | DIG | 1
2008-09-18 | VIN | DIG | 1
2008-09-18 | VIN | DIG | 1
2008-09-18 | VIN | DIG | 1
2008-09-18 | VIN | DIG | 1
2008-09-18 | RIS | DIG | 2
2008-09-06 | ROX | DIG | 1
2008-09-06 | ROX | DIG | 1
2008-09-06 | DIB | DIG | 3
2008-03-24 | YOK | DIG | 1
2008-03-24 | YOK | DIG | 1
2007-09-01 | VEB | DIG | 1
2007-09-01 | VEB | DIG | 1
2007-09-01 | VEB | DIG | 1
2007-09-01 | VEB | DIG | 2
2007-08-18 | DUN | DIG | A
2007-08-08 | IRI | DIG | 2
More information about the Babase
mailing list