**Always post back to the list**, which I have cc'ed, not just to me.
There is obviously some problem in your data files. As I have no idea
what their structure is or should be, I have no clue.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Tue, Mar 1, 2016 at 8:02 AM, Tara Jane Pirie
<T.J.Pirie at pgr.reading.ac.uk> wrote:> Hi Burt,
> Here are part of the data, I still get a miss-match but only 1 this time
however I have checked it and there is a "1" on that day.
>
> str(capture)
> 'data.frame': 78 obs. of 3 variables:
> $ LOC_ID : int 11 5 1 11 11 11 11 20 11 11 ...
> $ ANIMAL_ID: int 7 2 1 1 1 6 7 6 1 7 ...
> $ SO : int 1 5 6 6 7 7 8 10 16 18 ...
>
> str(traps)
> 'data.frame': 40 obs. of 94 variables:
> $ LOC_ID : int 1 5 6 53 7 8 9 12 16 18 ...
> $ X_Coord: int 230042 229616 231090 230924 232578
> $ Y_Coord: int 7236722 7235124 7234627 7237063 7234297
> $ X1 : int 1 1 1 1 1 1 1 1 1 1 ...
> $ X2 : int 1 1 1 1 1 1 1 1 1 1 ...
> $ X3 : int 1 1 1 1 1 1 1 1 1 1 ...
> $ X4 : int 1 1 1 1 1 1 1 1 1 1 ...
>
> <Tcl>
> Error - mismatch in animal capture details and trap deployment details
files : location id
> 29 not deployed on SO 22
> Error in if (locso[loc, so + 3] == 0) { :
> missing value where TRUE/FALSE needed
> Error - mismatch in animal capture details and trap deployment details
files : location id
> 29 not deployed on SO 22
> Error in if (locso[loc, so + 3] == 0) { :
> missing value where TRUE/FALSE needed
>
>
> Kind regards
> Tara Pirie
>
> Doctoral researcher - University of Reading
> People and Wildlife Research group
>
> Tel: +44 (0) 7340967711
>
> ________________________________________
> From: Bert Gunter <bgunter.4567 at gmail.com>
> Sent: 29 February 2016 17:26
> To: Tara Jane Pirie
> Cc: r-help at r-project.org
> Subject: Re: [R] Help with SpaceCAP
>
> The email server for this list filters out most attachments, including
yours.
>
> .txt attachments are generally permitted. As you seem to have
> successfully read the files into R, use dput() to include (a small
> portion if the data are numerous) of the data in your email. Before
> doing so, however, examine your data frame with str().
>
> ?dput
> ?str
>
> Cheers,
> Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip
)
>
>
> On Mon, Feb 29, 2016 at 5:08 AM, Tara Jane Pirie
> <T.J.Pirie at pgr.reading.ac.uk> wrote:
>>
>> Hi there,
>>
>> I am trying to load csv files into the spacecap program in R, but I
keep getting either or both of the following error messages:
>>
>>
>> Error - mismatch in animal capture details and trap deployment details
files : location id 29
>> not deployed on SO 22
>>
>> Error in if (locso[loc, so + 3] == 0) { :
>> missing value where TRUE/FALSE needed
>>
>> I have checked the headings and only have 3 columns for the capture
file and have double checked the trap locs. I have checked the working days for
the flagged trap locations, but they are showing "1".
>>
>> Please can you help me understand why I am getting these messages. I
have attached the files I have been trying to upload.
>>
>>
>> Kind regards
>> Tara Pirie
>>
>> Doctoral researcher - University of Reading
>> People and Wildlife Research group
>>
>> Tel: +44 (0) 7340967711
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.