From liz.morata at gmail.com Thu Oct 6 19:57:31 2016 From: liz.morata at gmail.com (Elizabeth Morata) Date: Thu, 6 Oct 2016 10:57:31 -0700 Subject: [tlocoh-info] Computing hulls for ancillary data values Message-ID: Hello, I am using the T-LoCoH package, along with the enjoyably written tutorial to examine peregrine falcon home ranges in the Pacific Northwest, and I am running into some trouble when trying to examine hull metrics using ancillary speed data to create a behavioral map of where birds are traveling and perhaps hunting within their home range. When I create an kxy object I have been specifying the 'anv' argument within the command to a data frame containing that single variable extracted from the original uploaded data. Is this correct? Later on when I try to compute hell metrics based on speed using the 'lhs.anv.add' and then the 'lhs.filter.anv' command I receive this error: Error in lhs.filter.anv(SamoaF_ann.lhs.12000, anv.var = Speed) : and after the colon proceeds to list out each of the values contained within the Speed variable. I assume I am mis-specifying some argument or leaving out an important argument, has anyone else created hulls based on ancillary data other than ellipse eccentricity, NSV and MNLV ? Thank you for any suggestions/input! Sincerely, Liz Morata -- *Elizabeth-Noelle F. Morata* M.Sc Candidate Department of Wildlife Humboldt State University Arcata, CA 95521 (510) 343-4346 liz.morata at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From wgetz at berkeley.edu Thu Oct 6 20:13:07 2016 From: wgetz at berkeley.edu (Wayne Marcus GETZ) Date: Thu, 6 Oct 2016 19:13:07 +0100 Subject: [tlocoh-info] Computing hulls for ancillary data values In-Reply-To: References: Message-ID: Hi Liz Hopefully Andy can help you Best Wayne Sent from my iPhone > On Oct 6, 2016, at 6:57 PM, Elizabeth Morata wrote: > > Hello, > > I am using the T-LoCoH package, along with the enjoyably written tutorial to examine peregrine falcon home ranges in the Pacific Northwest, and I am running into some trouble when trying to examine hull metrics using ancillary speed data to create a behavioral map of where birds are traveling and perhaps hunting within their home range. When I create an kxy object I have been specifying the 'anv' argument within the command to a data frame containing that single variable extracted from the original uploaded data. Is this correct? Later on when I try to compute hell metrics based on speed using the 'lhs.anv.add' and then the 'lhs.filter.anv' command I receive this error: > > Error in lhs.filter.anv(SamoaF_ann.lhs.12000, anv.var = Speed) : > > and after the colon proceeds to list out each of the values contained within the Speed variable. I assume I am mis-specifying some argument or leaving out an important argument, has anyone else created hulls based on ancillary data other than ellipse eccentricity, NSV and MNLV ? > > Thank you for any suggestions/input! > > Sincerely, > Liz Morata > > -- > Elizabeth-Noelle F. Morata > M.Sc Candidate > Department of Wildlife > Humboldt State University > Arcata, CA 95521 > (510) 343-4346 > liz.morata at gmail.com > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: From maja.bradaric92 at gmail.com Fri Oct 7 15:05:28 2016 From: maja.bradaric92 at gmail.com (maja.bradaric92 at gmail.com) Date: Fri, 7 Oct 2016 15:05:28 +0200 Subject: [tlocoh-info] Removing duplicates in my data Message-ID: <57f79d97.cf052e0a.bdcc0.c42e@mx.google.com> Hello, I`ve just started to use T-LoCoH package for my data analysis. In the begining, when I tried it with my GPS data for just one individual, it worked well. Now, I am trying to apply the codes on data I have about one species and after I make lxy object and plot it, no further actions are possible, since it keeps to send error messages about duplicates, even though it said that certain number of them was removed immediately after I created my lxy object. I tried to disable duplicate check, I`ve tried to repair the lxy object, but it didn`t work. Do you have any suggestions on how should I fix it? Thanks in advance. Maja -------------- next part -------------- An HTML attachment was scrubbed... URL: From mswagem1 at gwdg.de Fri Oct 7 16:01:40 2016 From: mswagem1 at gwdg.de (Miranda Swagemakers) Date: Fri, 7 Oct 2016 16:01:40 +0200 Subject: [tlocoh-info] Removing duplicates in my data In-Reply-To: <57f79d97.cf052e0a.bdcc0.c42e@mx.google.com> References: <57f79d97.cf052e0a.bdcc0.c42e@mx.google.com> Message-ID: Hi Maja, I think you're encountering a new kind of duplicate here. If I remember correctly, the dupes that get removed from the data set under the default settings are the ones that have the same location and time. The duplicates that you run into when making the lxy object are the once where the time is the same, but the locations are different. Those kind of dupes shouldn't occur (an animal can't be in two places at the same time), so you need to handle them somehow. I think there's an option somewhere to jitter the times? If that isn't the problem, maybe post the exact error message? Good luck, Miranda On Oct 7, 2016, 15:05, at 15:05, maja.bradaric92 at gmail.com wrote: >Hello, > >I`ve just started to use T-LoCoH package for my data analysis. In the >begining, when I tried it with my GPS data for just one individual, it >worked well. Now, I am trying to apply the codes on data I have about >one species and after I make lxy object and plot it, no further actions >are possible, since it keeps to send error messages about duplicates, >even though it said that certain number of them was removed immediately >after I created my lxy object. I tried to disable duplicate check, I`ve >tried to repair the lxy object, but it didn`t work. > >Do you have any suggestions on how should I fix it? > >Thanks in advance. > >Maja > > >------------------------------------------------------------------------ > >_______________________________________________ >Tlocoh-info mailing list >Tlocoh-info at lists.r-forge.r-project.org >http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: From galadrielent at yahoo.com Fri Oct 7 16:38:26 2016 From: galadrielent at yahoo.com (Sandra Smith Aguilar) Date: Fri, 7 Oct 2016 14:38:26 +0000 (UTC) Subject: [tlocoh-info] Removing duplicates in my data In-Reply-To: References: <57f79d97.cf052e0a.bdcc0.c42e@mx.google.com> Message-ID: <1196178371.104121.1475851106357@mail.yahoo.com> Hi Maja, I had that problem as well. I suggest turning the option to show duplicates to TRUE because usually it gives you a list of the positions it is registering as duplicates so you can see what the problem is. At some point I would not get the list of duplicates even though it had them because the function was bumping into anther problem due to a few lines in my database with had NA's instead of valid position values, but once i made sure there were no empty positions, the duplicate list showed up. Another possibility: since you said you have added more than one animal, maybe there is a problem indicating the ID field which is causing T-LoCoH not to realize it is dealing with more than one individual. Make sure the id argument is set to the id field for each of your individuals. Cheers,Sandra From: Miranda Swagemakers To: maja.bradaric92 at gmail.com Cc: tlocoh-info at lists.r-forge.r-project.org Sent: Friday, October 7, 2016 9:01 AM Subject: Re: [tlocoh-info] Removing duplicates in my data #yiv5246733747 #yiv5246733747 -- _filtered #yiv5246733747 {panose-1:2 4 5 3 5 4 6 3 2 4;} _filtered #yiv5246733747 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}#yiv5246733747 #yiv5246733747 p.yiv5246733747MsoNormal, #yiv5246733747 li.yiv5246733747MsoNormal, #yiv5246733747 div.yiv5246733747MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:11.0pt;}#yiv5246733747 a:link, #yiv5246733747 span.yiv5246733747MsoHyperlink {color:blue;text-decoration:underline;}#yiv5246733747 a:visited, #yiv5246733747 span.yiv5246733747MsoHyperlinkFollowed {color:#954F72;text-decoration:underline;}#yiv5246733747 .yiv5246733747MsoChpDefault {} _filtered #yiv5246733747 {margin:72.0pt 72.0pt 72.0pt 72.0pt;}#yiv5246733747 div.yiv5246733747WordSection1 {}#yiv5246733747 Hi Maja,I think you're encountering a new kind of duplicate here. If I remember correctly, the dupes that get removed from the data set under the default settings are the ones that have the same location and time.The duplicates that you run into when making the lxy object are the once where the time is the same, but the locations are different. Those kind of dupes shouldn't occur (an animal can't be in two places at the same time), so you need to handle them somehow. I think there's an option somewhere to jitter the times?If that isn't the problem, maybe post the exact error message?Good luck,MirandaOn Oct 7, 2016, at 15:05, maja.bradaric92 at gmail.com wrote: Hello,?I`ve just started to use T-LoCoH package for my data analysis. In the begining, when I tried it with my GPS data for just one individual, it worked well. Now, I am trying to apply the codes on data I have about one species and after I make lxy object and plot it, no further actions are possible, since it keeps to send error messages about duplicates, even though it said that certain number of them was removed immediately after I created my lxy object. I tried to disable duplicate check, I`ve tried to repair the lxy object, but it didn`t work. ?Do you have any suggestions on how should I fix it??Thanks in advance.?Maja Tlocoh -infomailing list Tlocoh-info at lists.r-forge.r-project.org http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info _______________________________________________ Tlocoh-info mailing list Tlocoh-info at lists.r-forge.r-project.org http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyons.andy at gmail.com Fri Oct 7 17:42:09 2016 From: lyons.andy at gmail.com (Andy Lyons) Date: Fri, 7 Oct 2016 08:42:09 -0700 Subject: [tlocoh-info] Computing hulls for ancillary data values In-Reply-To: References: Message-ID: Hi Liz, To use an ancillary value as the hull metric for sorting hulls when constructing isopleths, etc. you pass the following two arguments: my_lhs <- lhs.iso.add(my_lhs, sort.metric="anv", anv="humidity") The value of the anv argument should be the name of a column in the attached data frame for the points. In other words, you need to bring in the speed values into the LoCoH-lhs object before you can use them for sorting hulls. There are a couple of ways to do this. If you have your original locations saved in a data frame or matrix, you can specify which additional columns to retain as ancillary values when you first create the locoh-xy object. These extra columns will then be carried over when you create the hulls (and thus be available for sorting purposes). This is probably the safest way to include ancillary values into a hullset. There also functions lhs.anv.add() and lxy.anv.add(), which will allow you to import a column of values into an existing hullset or lxy object. These should be used with caution, however, because the function presumes the values being imported are in the same order as the points in the locoh-xy or locoh-hullset object. There is no option to match up points and values on a common field (although this would be helpful). If any duplicate points were deleted when the locoh-xy object was created, or reordered, then the points and values won't match up. Other functions that work with hull metrics operate similarly (you specify "anv" as the hull metric, and then pass the name of the column as the value of a separate *anv* argument. Klunky I know). I don't know if that answers your question, but if you are still getting error messages feel free to send me some output of your console and I'll take a look at it. Cheers, Andy On 10/6/2016 10:57 AM, Elizabeth Morata wrote: > Hello, > > I am using the T-LoCoH package, along with the enjoyably written > tutorial to examine peregrine falcon home ranges in the Pacific > Northwest, and I am running into some trouble when trying to examine > hull metrics using ancillary speed data to create a behavioral map of > where birds are traveling and perhaps hunting within their home range. > When I create an kxy object I have been specifying the 'anv' argument > within the command to a data frame containing that single variable > extracted from the original uploaded data. Is this correct? Later on > when I try to compute hell metrics based on speed using the > 'lhs.anv.add' and then the 'lhs.filter.anv' command I receive this error: > > Error in lhs.filter.anv(SamoaF_ann.lhs.12000, anv.var = Speed) : > > and after the colon proceeds to list out each of the values contained > within the Speed variable. I assume I am mis-specifying some argument > or leaving out an important argument, has anyone else created hulls > based on ancillary data other than ellipse eccentricity, NSV and MNLV ? > > Thank you for any suggestions/input! > > Sincerely, > Liz Morata > > -- > *Elizabeth-Noelle F. Morata* > M.Sc Candidate > Department of Wildlife > Humboldt State University > Arcata, CA 95521 > (510) 343-4346 > liz.morata at gmail.com > > > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyons.andy at gmail.com Fri Oct 7 18:23:49 2016 From: lyons.andy at gmail.com (Andy Lyons) Date: Fri, 7 Oct 2016 09:23:49 -0700 Subject: [tlocoh-info] Removing duplicates in my data In-Reply-To: <1196178371.104121.1475851106357@mail.yahoo.com> References: <57f79d97.cf052e0a.bdcc0.c42e@mx.google.com> <1196178371.104121.1475851106357@mail.yahoo.com> Message-ID: <8002d624-ec38-e14d-3f40-7f4335810b89@gmail.com> Good tips. By default points with the same location, time stamp, and id (individual) are considered to be duplicates and either deleted or ignored based on the arguments passed to the xyt.lxy() function. Unexpected duplicate point errors can be difficult to diagnose, but the show.dup.dt=TRUE argument can help. The View() function will open up a data frame in something that looks like a spreadsheet, which can help you identify duplicate locations, garbled time stamps, etc. If you still have problems feel free to post your console output and we'll take another look. Best, Andy On 10/7/2016 7:38 AM, Sandra Smith Aguilar wrote: > Hi Maja, > > I had that problem as well. I suggest turning the option to show > duplicates to TRUE because usually it gives you a list of the > positions it is registering as duplicates so you can see what the > problem is. At some point I would not get the list of duplicates even > though it had them because the function was bumping into anther > problem due to a few lines in my database with had NA's instead of > valid position values, but once i made sure there were no empty > positions, the duplicate list showed up. Another possibility: since > you said you have added more than one animal, maybe there is a problem > indicating the ID field which is causing T-LoCoH not to realize it is > dealing with more than one individual. Make sure the id argument is > set to the id field for each of your individuals. > > Cheers, > Sandra > > > ------------------------------------------------------------------------ > *From:* Miranda Swagemakers > *To:* maja.bradaric92 at gmail.com > *Cc:* tlocoh-info at lists.r-forge.r-project.org > *Sent:* Friday, October 7, 2016 9:01 AM > *Subject:* Re: [tlocoh-info] Removing duplicates in my data > > Hi Maja, > I think you're encountering a new kind of duplicate here. If I > remember correctly, the dupes that get removed from the data set under > the default settings are the ones that have the same location and time. > The duplicates that you run into when making the lxy object are the > once where the time is the same, but the locations are different. > Those kind of dupes shouldn't occur (an animal can't be in two places > at the same time), so you need to handle them somehow. I think there's > an option somewhere to jitter the times? > If that isn't the problem, maybe post the exact error message? > Good luck, > Miranda > On Oct 7, 2016, at 15:05, maja.bradaric92 at gmail.com > wrote: > > Hello, > I`ve just started to use T-LoCoH package for my data analysis. In > the begining, when I tried it with my GPS data for just one > individual, it worked well. Now, I am trying to apply the codes on > data I have about one species and after I make lxy object and plot > it, no further actions are possible, since it keeps to send error > messages about duplicates, even though it said that certain number > of them was removed immediately after I created my lxy object. I > tried to disable duplicate check, I`ve tried to repair the lxy > object, but it didn`t work. > Do you have any suggestions on how should I fix it? > Thanks in advance. > Maja > ------------------------------------------------------------------------ > > Tlocoh -info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info > > > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info > > > > > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: From maja.bradaric92 at gmail.com Mon Oct 10 11:07:09 2016 From: maja.bradaric92 at gmail.com (maja.bradaric92 at gmail.com) Date: Mon, 10 Oct 2016 11:07:09 +0200 Subject: [tlocoh-info] Removing duplicates in my data In-Reply-To: <8002d624-ec38-e14d-3f40-7f4335810b89@gmail.com> References: <57f79d97.cf052e0a.bdcc0.c42e@mx.google.com> <1196178371.104121.1475851106357@mail.yahoo.com> <8002d624-ec38-e14d-3f40-7f4335810b89@gmail.com> Message-ID: <57fb5a3e.da12190a.47219.882c@mx.google.com> Thanks everyone! I`ve managed to remove duplicates from the data. Now it works! From: Andy Lyons Sent: 07 October 2016 18:23 To: Sandra Smith Aguilar; Miranda Swagemakers; maja.bradaric92 at gmail.com Cc: tlocoh-info at lists.r-forge.r-project.org Subject: Re: [tlocoh-info] Removing duplicates in my data Good tips. By default points with the same location, time stamp, and id (individual) are considered to be duplicates and either deleted or ignored based on the arguments passed to the xyt.lxy() function. Unexpected duplicate point errors can be difficult to diagnose, but the show.dup.dt=TRUE argument can help. The View() function will open up a data frame in something that looks like a spreadsheet, which can help you identify duplicate locations, garbled time stamps, etc. If you still have problems feel free to post your console output and we'll take another look. Best, Andy On 10/7/2016 7:38 AM, Sandra Smith Aguilar wrote: Hi Maja, I had that problem as well. I suggest turning the option to show duplicates to TRUE because usually it gives you a list of the positions it is registering as duplicates so you can see what the problem is. At some point I would not get the list of duplicates even though it had them because the function was bumping into anther problem due to a few lines in my database with had NA's instead of valid position values, but once i made sure there were no empty positions, the duplicate list showed up. Another possibility: since you said you have added more than one animal, maybe there is a problem indicating the ID field which is causing T-LoCoH not to realize it is dealing with more than one individual. Make sure the id argument is set to the id field for each of your individuals. Cheers, Sandra From: Miranda Swagemakers To: maja.bradaric92 at gmail.com Cc: tlocoh-info at lists.r-forge.r-project.org Sent: Friday, October 7, 2016 9:01 AM Subject: Re: [tlocoh-info] Removing duplicates in my data Hi Maja, I think you're encountering a new kind of duplicate here. If I remember correctly, the dupes that get removed from the data set under the default settings are the ones that have the same location and time. The duplicates that you run into when making the lxy object are the once where the time is the same, but the locations are different. Those kind of dupes shouldn't occur (an animal can't be in two places at the same time), so you need to handle them somehow. I think there's an option somewhere to jitter the times? If that isn't the problem, maybe post the exact error message? Good luck, Miranda On Oct 7, 2016, at 15:05, maja.bradaric92 at gmail.com wrote: Hello, ? I`ve just started to use T-LoCoH package for my data analysis. In the begining, when I tried it with my GPS data for just one individual, it worked well. Now, I am trying to apply the codes on data I have about one species and after I make lxy object and plot it, no further actions are possible, since it keeps to send error messages about duplicates, even though it said that certain number of them was removed immediately after I created my lxy object. I tried to disable duplicate check, I`ve tried to repair the lxy object, but it didn`t work. ? Do you have any suggestions on how should I fix it? ? Thanks in advance. ? Maja Tlocoh -info mailing list Tlocoh-info at lists.r-forge.r-project.org http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info _______________________________________________ Tlocoh-info mailing list Tlocoh-info at lists.r-forge.r-project.org http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info _______________________________________________ Tlocoh-info mailing list Tlocoh-info at lists.r-forge.r-project.org http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0F02632D70794061A5CC353840F8F72F.png Type: image/png Size: 146 bytes Desc: not available URL: From maja.bradaric92 at gmail.com Wed Oct 19 15:54:01 2016 From: maja.bradaric92 at gmail.com (maja.bradaric92 at gmail.com) Date: Wed, 19 Oct 2016 15:54:01 +0200 Subject: [tlocoh-info] Ancillary variables Message-ID: <58077af9.56212e0a.9adef.7b51@mx.google.com> Hello everyone, I?ve started to use T-LoCoH just recently and I am still investigating can this package help me answer all the questions I have in my research. I guess this is very basic question, but, there is no so much explained about ancillary variables and what can be done if we have them in our data. If I include ancillary variables in my lxy object (temperature, for example), does that mean space use maps will later be created according to the ancillary variable? Or I can use them just to make subsets of the hulls according to certain temperature values? Can I produce behavioural maps according to temperature and possible temperature changes? I don`t really understand how this works, so I would be very grateful for any clarification, in order to be able to continue with my data analysis. Also, is it possible to include only one ancillary variable, or it can be more of them? Thanks in advance. Cheers, Maja -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyons.andy at gmail.com Mon Oct 24 19:22:26 2016 From: lyons.andy at gmail.com (Andy Lyons) Date: Mon, 24 Oct 2016 10:22:26 -0700 Subject: [tlocoh-info] Ancillary variables In-Reply-To: <58077af9.56212e0a.9adef.7b51@mx.google.com> References: <58077af9.56212e0a.9adef.7b51@mx.google.com> Message-ID: <18a95c7b-9827-124c-9aab-e40d1a311292@gmail.com> Hi Maja. Good questions. You are correct that there are not many guidelines for using ancillary variables in the documentation, but your instincts on how they could be useful in an analysis seem spot on. As a reminder to others, 'ancillary variable' is the T-LoCoH term for additional columns or attributes associated with each location. They can be either measured values from a GPS sensor (e.g., temperature), or derived during post-processing from other data (e.g., NDVI values). See lxy.anv.add() and lxy.gridanv.add(). Internally, ancillary variables are saved in columns in the data frame attached to the SpatialPointsDataFrame which contains the locations. All the original points are saved in both locoh-xy and locoh-hullset objects. One way you can use ancillary variables is for subsetting data, as you suggested. This could be useful for example if you wanted to look at space use patterns for different sets of locations based on an attribute field. To create subsets of hulls, see lhs.filter.anv(), to create subsets of points from a locoh-xy object see lxy.subset() (I can send a code sample if it isn't clear how to use). Subsetting location data could also of course be done prior to turning the locations into a locoh-xy object. Ancillary variables can also be used to sort hulls when constructing isopleths. This is one option for differentiating internal space within the 'home range' along a gradient other than density. If your GPS sensor recorded temperature, for example, you could create a utilization distribution that highlights how the individual used the space based on a temperature gradient. IMHO, the ability to create UDs that differentiate space use along behavioral or environmental gradients is one of T-LoCoH's most interesting and underutilized features which has a lot of promise for connecting the concept of a home range to a much broader range of behavioral and ecological questions (e.g., Fieberg and B?rger 2012 ). To sort hulls based on an ancillary variable, you would pass sort.metric="anv" to the function lhs.iso.add(), with an additional argument called anv that passes the name of the ancillary variable column name of interest (e.g., anv="temp"). The 'anv' hull metric is defined to be the ancillary variable value of the hull parent point. You may ask why the hull parent point, and not the mean value of all points used to construct the hull, or all points enclosed by the hull? That was just the easiest to implement, but if you were going to sort hulls for isopleths it might be better to define a hull metric for the mean ancillary value for all enclosed points (depends on the pattern you're seeking). Defining new hull metrics is not terribly hard but takes some coding knowledge, contact me for details. You can also use ancillary variables of the hull parent point as you would any other hull metric - for plotting symbology, in scatter plots, etc. If you see an interesting pattern in a two-dimensional scatterplot of an ancillary variable and another hull metric, you can use that as a legend in a map (e.g., Fig 10 in Lyons et al 2013 ). Hope this helps you think about possible ways for using ancillary variables in an analysis. A lot of this is new territory, but T-LoCoH is all about giving you a flexible set of tools to explore and visualize your data. Let me know if you have any questions or need help with any of the functions. Cheers, Andy On 10/19/2016 6:54 AM, maja.bradaric92 at gmail.com wrote: > > Hello everyone, > > I?ve started to use T-LoCoH just recently and I am still investigating > can this package help me answer all the questions I have in my > research. I guess this is very basic question, but, there is no so > much explained about ancillary variables and what can be done if we > have them in our data. > > If I include ancillary variables in my lxy object (temperature, for > example), does that mean space use maps will later be created > according to the ancillary variable? Or I can use them just to make > subsets of the hulls according to certain temperature values? Can I > produce behavioural maps according to temperature and possible > temperature changes? I don`t really understand how this works, so I > would be very grateful for any clarification, in order to be able to > continue with my data analysis. > > Also, is it possible to include only one ancillary variable, or it can > be more of them? > > Thanks in advance. > > Cheers, > > Maja > > > > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -- *T-LoCoH*: A hull-based method for home range construction and spatiotemporal analysis of movement data. Lyons, A., Turner, W.C., and WM Getz. 2013. Home Range Plus: A Space-Time Characterization of Movement Over Real Landscapes. BMC Movement Ecology 1:2 . http://tlocoh.r-forge.r-project.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From maja.bradaric92 at gmail.com Tue Oct 25 14:50:27 2016 From: maja.bradaric92 at gmail.com (maja.bradaric92 at gmail.com) Date: Tue, 25 Oct 2016 14:50:27 +0200 Subject: [tlocoh-info] Ancillary variables In-Reply-To: <18a95c7b-9827-124c-9aab-e40d1a311292@gmail.com> References: <58077af9.56212e0a.9adef.7b51@mx.google.com> <18a95c7b-9827-124c-9aab-e40d1a311292@gmail.com> Message-ID: <580f5515.c2202e0a.5d3d5.32ea@mx.google.com> Hi Andy (and everyone), Thank you very much for your reply. During past few days I?ve managed to find all of these functions myself and to check how they work on my data. However, I encountered some problems. When I used ancillary variable as hull metric in order to make a two dimensional scatter plot and run this function: hsp2 <- lhs.plot.scatter(Lizard.lhs.k21, x="anv", y="area", anv="Air_temp",col="spiral",bg="black"), I was sent to the debugging environment in R. The message on the top says: ?Debug location is approximate because the source is not available?, and when I do the execution, I get my scatter plot. But, when I run the next function: plot(Lizard.lhs.k21, hpp=T,hsp=hsp2, hpp.classify="hsp"), so I can plot my data points and use a scatter plot as a legend, I get the following error message: ?Can?t find values for saved hull scatter plot?. I am guessing I should do something differently in the debug part of the problem? Also, I think it would be nicer to use mean values of ancillary variables for all data points included in one hull, not only the value of parent point, and I would be really grateful if you or anyone else can help me with that. Cheers, Maja From: Andy Lyons Sent: 24 October 2016 19:22 To: maja.bradaric92 at gmail.com; tlocoh-info at lists.r-forge.r-project.org Subject: Re: [tlocoh-info] Ancillary variables Hi Maja. Good questions. You are correct that there are not many guidelines for using ancillary variables in the documentation, but your instincts on how they could be useful in an analysis seem spot on. As a reminder to others, 'ancillary variable' is the T-LoCoH term for? additional columns or attributes associated with each location. They can be either measured values from a GPS sensor (e.g., temperature), or derived during post-processing from other data (e.g., NDVI values). See lxy.anv.add() and lxy.gridanv.add(). Internally, ancillary variables are saved in columns in the data frame attached to the SpatialPointsDataFrame which contains the locations. All the original points are saved in both locoh-xy and locoh-hullset objects. One way you can use ancillary variables is for subsetting data, as you suggested. This could be useful for example if you wanted to look at space use patterns for different sets of locations based on an attribute field. To create subsets of hulls, see lhs.filter.anv(), to create subsets of points from a locoh-xy object see lxy.subset() (I can send a code sample if it isn't clear how to use). Subsetting location data could also of course be done prior to turning the locations into a locoh-xy object. Ancillary variables can also be used to sort hulls when constructing isopleths. This is one option for differentiating internal space within the 'home range' along a gradient other than density. If your GPS sensor recorded temperature, for example, you could create a utilization distribution that highlights how the individual used the space based on a temperature gradient. IMHO, the ability to create UDs that differentiate space use along behavioral or environmental gradients is one of T-LoCoH's most interesting and underutilized features which has a lot of promise for connecting the concept of a home range to a much broader range of behavioral and ecological questions (e.g., Fieberg and B?rger 2012). To sort hulls based on an ancillary variable, you would pass sort.metric="anv" to the function lhs.iso.add(), with an additional argument called anv that passes the name of the ancillary variable column name of interest (e.g., anv="temp"). The 'anv' hull metric is defined to be the ancillary variable value of the hull parent point. You may ask why the hull parent point, and not the mean value of all points used to construct the hull, or all points enclosed by the hull? That was just the easiest to implement, but if you were going to sort hulls for isopleths it might be better to define a hull metric for the mean ancillary value for all enclosed points (depends on the pattern you're seeking). Defining new hull metrics is not terribly hard but takes some coding knowledge, contact me for details. ? You can also use ancillary variables of the hull parent point as you would any other hull metric - for plotting symbology, in scatter plots, etc. If you see an interesting pattern in a two-dimensional scatterplot of an ancillary variable and another hull metric, you can use that as a legend in a map (e.g., Fig 10 in Lyons et al 2013). Hope this helps you think about possible ways for using ancillary variables in an analysis. A lot of this is new territory, but T-LoCoH is all about giving you a flexible set of tools to explore and visualize your data. Let me know if you have any questions or need help with any of the functions. Cheers, Andy ? On 10/19/2016 6:54 AM, maja.bradaric92 at gmail.com wrote: Hello everyone, ? I?ve started to use T-LoCoH just recently and I am still investigating can this package help me answer all the questions I have in my research. I guess this is very basic question, but, there is no so much explained about ancillary variables and what can be done if we have them in our data. ? If I include ancillary variables in my lxy object (temperature, for example), does that mean space use maps will later be created according to the ancillary variable? Or I can use them just to make subsets of the hulls according to certain temperature values? Can I produce behavioural maps according to temperature and possible temperature changes? I don`t really understand how this works, so I would be very grateful for any clarification, in order to be able to continue with my data analysis. ? Also, is it possible to include only one ancillary variable, or it can be more of them? ? Thanks in advance. ? Cheers, ? Maja ? ? ? ? _______________________________________________ Tlocoh-info mailing list Tlocoh-info at lists.r-forge.r-project.org http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -- T-LoCoH: A hull-based method for home range construction and spatiotemporal analysis of movement data. Lyons, A., Turner, W.C., and WM Getz. 2013. Home Range Plus: A Space-Time Characterization of Movement Over Real Landscapes. BMC Movement Ecology 1:2. http://tlocoh.r-forge.r-project.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From lyons.andy at gmail.com Tue Oct 25 18:16:58 2016 From: lyons.andy at gmail.com (Andy Lyons) Date: Tue, 25 Oct 2016 09:16:58 -0700 Subject: [tlocoh-info] Ancillary variables In-Reply-To: <580f5515.c2202e0a.5d3d5.32ea@mx.google.com> References: <58077af9.56212e0a.9adef.7b51@mx.google.com> <18a95c7b-9827-124c-9aab-e40d1a311292@gmail.com> <580f5515.c2202e0a.5d3d5.32ea@mx.google.com> Message-ID: <84691496-d5e9-8d7d-81aa-f4189958b070@gmail.com> Hi Maja, I don't see anything obviously wrong with your code. The fact that you're getting an error message suggests you might have encountered a bug or there is something about your data the function isn't dealing with properly. I can help you sort through the errors if I can reproduce them. Can you send me a separate email and we'll figure out a way to figure this out? For example we can do a video call or you could send me a chunk of your code and data that reproduces the error. Then we can report back to the list how the issue was solved. Cheers, Andy On 10/25/2016 5:50 AM, maja.bradaric92 at gmail.com wrote: > > Hi Andy (and everyone), > > Thank you very much for your reply. During past few days I?ve managed > to find all of these functions myself and to check how they work on my > data. > > However, I encountered some problems. When I used ancillary variable > as hull metric in order to make a two dimensional scatter plot and run > this function: > > hsp2 <- lhs.plot.scatter(Lizard.lhs.k21, x="anv", y="area", > anv="Air_temp",col="spiral",bg="black"), > > I was sent to the debugging environment in R. The message on the top > says: ?Debug location is approximate because the source is not > available?, and when I do the execution, I get my scatter plot. But, > when I run the next function: > > plot(Lizard.lhs.k21, hpp=T,hsp=hsp2, hpp.classify="hsp"), > > so I can plot my data points and use a scatter plot as a legend, I get > the following error message: ?Can?t find values for saved hull scatter > plot?. I am guessing I should do something differently in the debug > part of the problem? > > Also, I think it would be nicer to use mean values of ancillary > variables for all data points included in one hull, not only the value > of parent point, and I would be really grateful if you or anyone else > can help me with that. > > Cheers, > > Maja > > *From: *Andy Lyons > *Sent: *24 October 2016 19:22 > *To: *maja.bradaric92 at gmail.com ; > tlocoh-info at lists.r-forge.r-project.org > > *Subject: *Re: [tlocoh-info] Ancillary variables > > Hi Maja. Good questions. You are correct that there are not many > guidelines for using ancillary variables in the documentation, but > your instincts on how they could be useful in an analysis seem spot > on. As a reminder to others, 'ancillary variable' is the T-LoCoH term > for additional columns or attributes associated with each location. > They can be either measured values from a GPS sensor (e.g., > temperature), or derived during post-processing from other data (e.g., > NDVI values). See lxy.anv.add() and lxy.gridanv.add(). Internally, > ancillary variables are saved in columns in the data frame attached to > the SpatialPointsDataFrame which contains the locations. All the > original points are saved in both locoh-xy and locoh-hullset objects. > > One way you can use ancillary variables is for subsetting data, as you > suggested. This could be useful for example if you wanted to look at > space use patterns for different sets of locations based on an > attribute field. To create subsets of hulls, see lhs.filter.anv(), to > create subsets of points from a locoh-xy object see lxy.subset() (I > can send a code sample if it isn't clear how to use). Subsetting > location data could also of course be done prior to turning the > locations into a locoh-xy object. > > Ancillary variables can also be used to sort hulls when constructing > isopleths. This is one option for differentiating internal space > within the 'home range' along a gradient other than density. If your > GPS sensor recorded temperature, for example, you could create a > utilization distribution that highlights how the individual used the > space based on a temperature gradient. IMHO, the ability to create UDs > that differentiate space use along behavioral or environmental > gradients is one of T-LoCoH's most interesting and underutilized > features which has a lot of promise for connecting the concept of a > home range to a much broader range of behavioral and ecological > questions (e.g., Fieberg and B?rger 2012 > ). > > To sort hulls based on an ancillary variable, you would pass > sort.metric="anv" to the function lhs.iso.add(), with an additional > argument called anv that passes the name of the ancillary variable > column name of interest (e.g., anv="temp"). The 'anv' hull metric is > defined to be the ancillary variable value of the hull parent point. > You may ask why the hull parent point, and not the mean value of all > points used to construct the hull, or all points enclosed by the hull? > That was just the easiest to implement, but if you were going to sort > hulls for isopleths it might be better to define a hull metric for the > mean ancillary value for all enclosed points (depends on the pattern > you're seeking). Defining new hull metrics is not terribly hard but > takes some coding knowledge, contact me for details. > > You can also use ancillary variables of the hull parent point as you > would any other hull metric - for plotting symbology, in scatter > plots, etc. If you see an interesting pattern in a two-dimensional > scatterplot of an ancillary variable and another hull metric, you can > use that as a legend in a map (e.g., Fig 10 > > in Lyons et al 2013 ). > > Hope this helps you think about possible ways for using ancillary > variables in an analysis. A lot of this is new territory, but T-LoCoH > is all about giving you a flexible set of tools to explore and > visualize your data. Let me know if you have any questions or need > help with any of the functions. > > Cheers, > Andy > > > On 10/19/2016 6:54 AM, maja.bradaric92 at gmail.com > wrote: > > Hello everyone, > > I?ve started to use T-LoCoH just recently and I am still > investigating can this package help me answer all the questions I > have in my research. I guess this is very basic question, but, > there is no so much explained about ancillary variables and what > can be done if we have them in our data. > > If I include ancillary variables in my lxy object (temperature, > for example), does that mean space use maps will later be created > according to the ancillary variable? Or I can use them just to > make subsets of the hulls according to certain temperature values? > Can I produce behavioural maps according to temperature and > possible temperature changes? I don`t really understand how this > works, so I would be very grateful for any clarification, in order > to be able to continue with my data analysis. > > Also, is it possible to include only one ancillary variable, or it > can be more of them? > > Thanks in advance. > > Cheers, > > Maja > > > > > _______________________________________________ > > Tlocoh-info mailing list > > Tlocoh-info at lists.r-forge.r-project.org > > > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info > > -- > *T-LoCoH*: A hull-based method for home range construction and > spatiotemporal analysis of movement data. > Lyons, A., Turner, W.C., and WM Getz. 2013. Home Range Plus: A > Space-Time Characterization of Movement Over Real Landscapes. BMC > Movement Ecology 1:2 > . > http://tlocoh.r-forge.r-project.org > > > > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: From brupage at gmail.com Tue Oct 25 18:31:21 2016 From: brupage at gmail.com (Bruce Page) Date: Tue, 25 Oct 2016 18:31:21 +0200 Subject: [tlocoh-info] Ancillary variables In-Reply-To: <84691496-d5e9-8d7d-81aa-f4189958b070@gmail.com> References: <58077af9.56212e0a.9adef.7b51@mx.google.com> <18a95c7b-9827-124c-9aab-e40d1a311292@gmail.com> <580f5515.c2202e0a.5d3d5.32ea@mx.google.com> <84691496-d5e9-8d7d-81aa-f4189958b070@gmail.com> Message-ID: <4ECDD251-9917-445B-912C-6936E9B9E751@gmail.com> Hi Andy and Maja I am very interested in this thread as I assume a number of others are. Thanks for the input Maja and the help Andy. look forward to seeing the solution. Regards Bruce Page > On Oct 25, 2016, at 6:16 PM, Andy Lyons wrote: > > Hi Maja, > > I don't see anything obviously wrong with your code. The fact that you're getting an error message suggests you might have encountered a bug or there is something about your data the function isn't dealing with properly. I can help you sort through the errors if I can reproduce them. Can you send me a separate email and we'll figure out a way to figure this out? For example we can do a video call or you could send me a chunk of your code and data that reproduces the error. Then we can report back to the list how the issue was solved. > > Cheers, > Andy > > > On 10/25/2016 5:50 AM, maja.bradaric92 at gmail.com wrote: >> Hi Andy (and everyone), >> >> Thank you very much for your reply. During past few days I?ve managed to find all of these functions myself and to check how they work on my data. >> >> However, I encountered some problems. When I used ancillary variable as hull metric in order to make a two dimensional scatter plot and run this function: >> >> hsp2 <- lhs.plot.scatter(Lizard.lhs.k21, x="anv", y="area", anv="Air_temp",col="spiral",bg="black"), >> >> I was sent to the debugging environment in R. The message on the top says: ?Debug location is approximate because the source is not available?, and when I do the execution, I get my scatter plot. But, when I run the next function: >> >> plot(Lizard.lhs.k21, hpp=T,hsp=hsp2, hpp.classify="hsp"), >> >> so I can plot my data points and use a scatter plot as a legend, I get the following error message: ?Can?t find values for saved hull scatter plot?. I am guessing I should do something differently in the debug part of the problem? >> >> Also, I think it would be nicer to use mean values of ancillary variables for all data points included in one hull, not only the value of parent point, and I would be really grateful if you or anyone else can help me with that. >> >> Cheers, >> >> Maja >> >> >> >> >> >> From: Andy Lyons >> Sent: 24 October 2016 19:22 >> To: maja.bradaric92 at gmail.com ; tlocoh-info at lists.r-forge.r-project.org >> Subject: Re: [tlocoh-info] Ancillary variables >> >> Hi Maja. Good questions. You are correct that there are not many guidelines for using ancillary variables in the documentation, but your instincts on how they could be useful in an analysis seem spot on. As a reminder to others, 'ancillary variable' is the T-LoCoH term for additional columns or attributes associated with each location. They can be either measured values from a GPS sensor (e.g., temperature), or derived during post-processing from other data (e.g., NDVI values). See lxy.anv.add() and lxy.gridanv.add(). Internally, ancillary variables are saved in columns in the data frame attached to the SpatialPointsDataFrame which contains the locations. All the original points are saved in both locoh-xy and locoh-hullset objects. >> >> One way you can use ancillary variables is for subsetting data, as you suggested. This could be useful for example if you wanted to look at space use patterns for different sets of locations based on an attribute field. To create subsets of hulls, see lhs.filter.anv(), to create subsets of points from a locoh-xy object see lxy.subset() (I can send a code sample if it isn't clear how to use). Subsetting location data could also of course be done prior to turning the locations into a locoh-xy object. >> >> Ancillary variables can also be used to sort hulls when constructing isopleths. This is one option for differentiating internal space within the 'home range' along a gradient other than density. If your GPS sensor recorded temperature, for example, you could create a utilization distribution that highlights how the individual used the space based on a temperature gradient. IMHO, the ability to create UDs that differentiate space use along behavioral or environmental gradients is one of T-LoCoH's most interesting and underutilized features which has a lot of promise for connecting the concept of a home range to a much broader range of behavioral and ecological questions (e.g., Fieberg and B?rger 2012 ). >> >> To sort hulls based on an ancillary variable, you would pass sort.metric="anv" to the function lhs.iso.add(), with an additional argument called anv that passes the name of the ancillary variable column name of interest (e.g.,anv="temp"). The 'anv' hull metric is defined to be the ancillary variable value of the hull parent point. You may ask why the hull parent point, and not the mean value of all points used to construct the hull, or all points enclosed by the hull? That was just the easiest to implement, but if you were going to sort hulls for isopleths it might be better to define a hull metric for the mean ancillary value for all enclosed points (depends on the pattern you're seeking). Defining new hull metrics is not terribly hard but takes some coding knowledge, contact me for details. >> >> You can also use ancillary variables of the hull parent point as you would any other hull metric - for plotting symbology, in scatter plots, etc. If you see an interesting pattern in a two-dimensional scatterplot of an ancillary variable and another hull metric, you can use that as a legend in a map (e.g., Fig 10 in Lyons et al 2013 ). >> >> Hope this helps you think about possible ways for using ancillary variables in an analysis. A lot of this is new territory, but T-LoCoH is all about giving you a flexible set of tools to explore and visualize your data. Let me know if you have any questions or need help with any of the functions. >> >> Cheers, >> Andy >> >> >> >> >> On 10/19/2016 6:54 AM, maja.bradaric92 at gmail.com wrote: >> Hello everyone, >> >> I?ve started to use T-LoCoH just recently and I am still investigating can this package help me answer all the questions I have in my research. I guess this is very basic question, but, there is no so much explained about ancillary variables and what can be done if we have them in our data. >> >> If I include ancillary variables in my lxy object (temperature, for example), does that mean space use maps will later be created according to the ancillary variable? Or I can use them just to make subsets of the hulls according to certain temperature values? Can I produce behavioural maps according to temperature and possible temperature changes? I don`t really understand how this works, so I would be very grateful for any clarification, in order to be able to continue with my data analysis. >> >> Also, is it possible to include only one ancillary variable, or it can be more of them? >> >> Thanks in advance. >> >> Cheers, >> >> Maja >> >> >> >> >> >> >> >> _______________________________________________ >> Tlocoh-info mailing list >> Tlocoh-info at lists.r-forge.r-project.org >> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info >> >> -- >> T-LoCoH: A hull-based method for home range construction and spatiotemporal analysis of movement data. >> Lyons, A., Turner, W.C., and WM Getz. 2013. Home Range Plus: A Space-Time Characterization of Movement Over Real Landscapes. BMC Movement Ecology 1:2 . >> http://tlocoh.r-forge.r-project.org >> >> >> >> _______________________________________________ >> Tlocoh-info mailing list >> Tlocoh-info at lists.r-forge.r-project.org >> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info > > _______________________________________________ > Tlocoh-info mailing list > Tlocoh-info at lists.r-forge.r-project.org > http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tlocoh-info -------------- next part -------------- An HTML attachment was scrubbed... URL: