tag:blogger.com,1999:blog-17419196743734495762024-03-14T03:21:23.379-05:00Claire M. CurryC.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.comBlogger121125tag:blogger.com,1999:blog-1741919674373449576.post-6563371994956833372019-07-16T09:00:00.000-05:002019-07-16T09:00:03.121-05:00New paper out: An arduino-based RFID platform for animal research<div style="text-align: start;">
<div style="text-align: left;">
Since 2017 I've been working with <a href="http://thebridgelab.oucreate.com/" target="_blank">Eli Bridge</a> and <a href="https://arrc.ou.edu/~ruyle/index.php/jessica-ruyle/" target="_blank">J.E. Ruyle</a> (<a href="https://arrc.ou.edu/" target="_blank">OU Advanced Radar Research Center</a>) to create ETAG, the Electronic Transponder Analysis Gateway. It will be a data management system for scientists working with <a href="http://thebridgelab.oucreate.com/research-2/gadgets/rfid/" target="_blank">radio-frequency identification (RFID) technology for animal studies</a>. An overview of the hardware side of ETAG with a brief discussion of the software has just been published in <a href="https://www.frontiersin.org/articles/10.3389/fevo.2019.00257/abstract" target="_blank">Frontiers in Ecology and Evolution</a>.</div>
</div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-67493487751245289012019-06-18T09:00:00.000-05:002019-07-01T10:47:49.023-05:00Setting up an RStudio server on Amazon Web Services<div class="MsoNormal">
I have sometimes used using Amazon Web Services to outsource some very computationally intensive analyses, such as for my paper last year on <a href="https://onlinelibrary.wiley.com/doi/full/10.1002/ece3.4725" target="_blank">species distribution modeling</a>. Here's a quick guide to setting it up.<br />
<br />
I first set up an Amazon Elastic Cloud Computer (EC2) instance with the latest Ubuntu following <a href="http://randyzwitch.com/r-amazon-ec2/" target="_blank">these instructions</a>. </div>
<div class="MsoNormal">
<br />
Then log into the instance on SSH (AWS has very clear and helpful tutorials on this that depend on whether you are logging on from Windows or a Linux operating system) and run the below commands. The first one adds your rstudio user (that you will log onto from a web browser), makes a directory, lets you set the rstudio user password that you will use to log on, and then sets permissions so you can write to this directory.<br />
<br />
All of the commands I discuss today you will input into the SSH terminal. This means you are making changes to the remote computer (the Amazon EC2 instance, i.e., your new RStudio webserver), not your local computer. Do not input the dollar sign - this represents the prompt that the terminal shows. <br />
<br /></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: #f9f9f9; color: #404040;">$</span>sudo useradd rstudio<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: #f9f9f9; color: #404040;">$</span>sudo mkdir /home/rstudio<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: #f9f9f9; color: #404040;">$</span>sudo passwd rstudio<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: #f9f9f9; color: #404040;">$</span>sudo chmod -R 0777 /home/rstudio</span><o:p></o:p></div>
<div class="MsoNormal">
<br />
Then update your instance.</div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: #f9f9f9; color: #404040;">$</span>sudo apt-get update<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: #f9f9f9; color: #404040;">$</span>sudo apt-get upgrade</span><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Here I use nano instead of vi to edit a new sources.list file (you have to put the .d or it won't be saved). Other instructions I've seen use vi but I prefer nano as a simpler for the uninitiated like myself.</div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;">$sudo nano /etc/apt/sources.list.d/sources.list</span><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Once you're in nano, add this line to the sources.list file. You can replace it with your favorite CRAN mirror and whatever version of ubuntu you have.<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">$</span>deb https://cloud.r-project.org/bin/linux/ubuntu xenial/</span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Next, add the key to your system.</div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;">$sudo apt-key adv --keyserver keyserver.ubuntu.com
--recv-keys E084DAB9<o:p></o:p></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<div class="MsoNormal">
Then update again...</div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;">$sudo apt-get update</span><o:p></o:p></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
...and install the latest version of R (next code line). If you don't do the sources.list and key steps from previous lines, the r-base version will be older than current.</div>
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;">$sudo apt-get install r-base</span><o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now that R is installed, install RStudio Server using the three lines below. Go to <a href="https://www.rstudio.com/products/rstudio/download-server/" target="_blank">the RStudio website</a> for an updated version na<span style="background-color: white;">me for the .deb
file (the code below is current as of 11 April 2017 when I first drafted this post for my own reference; I recommend going to find the most up-to-date filename). <o:p></o:p></span></div>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: inherit;"><br /></span>
</span></span></span><br />
<div class="MsoNormal">
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: 115%;">$sudo apt-get install
gdebi-core</span><span style="line-height: 115%;"><br style="box-sizing: border-box;" /></span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="font-family: inherit;"><span style="line-height: 115%;">$wget
https://download2.rstudio.org/rstudio-server-1.0.143-amd64.deb</span></span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="font-family: inherit;"><span style="line-height: 115%;">$sudo gdebi rstudio-server-1.0.143-amd64.deb</span></span></span></span><br />
<span style="background-color: white;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: inherit;"><o:p></o:p></span><br /></span></span>
<span style="background-color: white;"><span style="line-height: 115%;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: inherit;"><br /></span></span><span style="line-height: 115%;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: inherit;">Then you should be able to go to the IP address for your server (check in the EC2 console in AWS to get the IP address) with :8787 after it, and log in using the username and password you created at the beginning.</span></span></span><br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"><span style="line-height: 115%;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: inherit;"><br /></span></span></span>
<span style="background-color: white;"><span style="line-height: 115%;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: inherit;">Part of the reason I wanted to use an AWS server is that I had a huge dataset that didn't fit on my laptop. Now that RStudio can be logged in, attach an Elastic Block Storage (EBS) volume to allow storing your files. You can think of it like an external hard drive for your Amazon web server.</span></span></span><br />
<span style="background-color: white;"><span style="line-height: 115%;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: inherit;"><br /></span></span></span>
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;"><span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-family: inherit;">These instructions are adapted from the AWS tutorial and assume <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html" target="_blank">you are using </a></span><a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html" target="_blank">using an instance and EBS volume that was created with the instance and is currently empty</a>.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="color: #404040; font-family: inherit;"></span></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="color: #404040; font-family: "courier new" , "courier" , monospace;">$lsblk</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;">$sudo file -s /dev/xvdb</span></span><br />
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;">Answer was "data" which means is empty, no file system.</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="color: #404040; font-family: inherit;"><br /></span></span></span>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="color: #404040; font-family: inherit;">$sudo mkfs -t ext4 /dev/xvdb</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="color: #404040; font-family: inherit;">$sudo mkdir /data</span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;"><span style="color: #404040; font-family: inherit;">$sudo mount /dev/xvdb /data</span></span></span><br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;">$sudo chmod -R 0777 /data</span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><span style="background-color: white;">$sudo chmod -R 0777 /data/*</span></span><br />
<span style="background-color: white;">These two lines add write permission for the folder and files.</span><br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;">I rebooted my instance and was terrified to not find the data drive. However, it was because I have to mount the drive (the mount step above) each time. You can change the fstab file to make it mount permanently. To do this, search for the UUID of your EBS volume after it has been mounted.</span></span><br />
<span style="background-color: white;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #404040; font-family: inherit;">$sudo blkid</span></span></span><br />
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;"><br /></span></span>
<span style="background-color: white;"></span><br />
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;">You should get an answer back something like this:</span></span>
<span style="background-color: white;"></span><br />
<span style="background-color: white;"><span style="color: #404040;">/dev/xvdb: UUID="ab82e239-b284-4527-922f-b82b6b9ebc8c" TYPE="ext4"</span></span><br />
<div>
<span style="background-color: white;"><br /></span></div>
<span style="background-color: white;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="color: #404040; font-family: inherit;">$sudo cp /etc/fstab /etc/fstab.orig</span></span></span><br />
<span style="background-color: white;"><span style="font-family: "courier new" , "courier" , monospace;">$sudo nano /etc/fstab</span></span><br />
<br />
Updated to note: Update the fstab file to include the UUID. (I have forgotten exactly where, but this <a href="https://askubuntu.com/a/154186" target="_blank">askubuntu.com answer says how</a>.)<br />
<span style="background-color: white;"></span><br />
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;"><br /></span></span>
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;">The EBS volume should now be mounted permanently. </span></span><br />
<br />
<span style="background-color: white;"><span style="color: #404040; font-family: inherit;">To do mount a volume created from scratch (not at the time of the instance creation),</span></span><br />
<span style="background-color: white;"><span style="color: #404040;"><span style="color: #404040; font-family: inherit;">follow<a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html" target="_blank"> these steps</a> and </span><span style="font-family: inherit;">mount the volume as previously. </span></span><span style="color: #404040;">If the volume size needs increasing later on (i.e., you didn't predict the size of storage you needed), follow these <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html" target="_blank">instructions</a>. T</span>hen, if you are using a Linux system like Ubuntu, <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux" target="_blank">these</a>.</span><br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white;">You should now be able to shut down or reboot your RStudio server and still have the EBS volume still mounted.</span></div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-27977583843063114382019-06-04T09:00:00.000-05:002019-06-04T09:00:06.228-05:00New paper out: Complex spatiotemporal variation in processes shaping song variationI am proud to announce the fourth paper out from my dissertation. This one is now out as online early in <a href="https://doi.org/10.1163/1568539X-00003556" target="_blank">Behaviour</a>. This paper covers variation in titmouse song between the younger and older hybrid zones based on song recordings and vegetation measurements I took in both Texas and Oklahoma. To quote from the abstract:<br />
<br />
<div style="text-align: center;">
<span style="font-family: "Courier New", Courier, monospace;">In the recent zone, noise and vegetation structure were correlated with
several song characteristics, but in the older zone, these features did
not correlate despite similar gradients in song features. Our data,
combined with previous studies, suggest that despite overall
similarities in characteristics, songs in the older zone may be more
shaped by sexual selection, whereas songs in the young zone are shaped
by environment. Thus, even within the same species, processes shaping
signal structure can vary spatially and temporally.</span></div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-63409199352066168212019-05-21T09:00:00.000-05:002019-05-21T09:00:03.799-05:00Using Git and Git Bash on a network driveI've run into two problems lately with using Git with a network drive.<br />
<br />
First, I use RStudio with R projects that contain a Git repository. Some of these projects are stored on a network drive. This is a shared drive that has a sort of odd file path (<a href="https://stackoverflow.com/questions/2787203/unc-path-to-a-folder-on-my-local-computer" target="_blank">as described in this question</a>). As I wasn't sure how to map a network ("UNC path") to a folder (<a href="https://community.rstudio.com/t/git-in-rstudio-does-not-recognize-path-in-unc-format/4414" target="_blank">the suggested solution</a>), I poked around to see what else might get it to work.<br />
<br />
I ended up running RStudio as administrator. This allowed me to set the project as having Git (before, when running as non-administrator, this gave a useless error message saying "function error"). Once I set the global options to project having version control, RStudio created a new .Rproj file, restarted itself, and then the Git tab appeared in RStudio. When I opened the .RProj file again I did not need to run as administrator.<br />
<br />
Second, I wanted to run Git in a folder located on a network drive by right-clicking in the repository folder on "Git Bash". This brings up Git Bash, but it says "CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory." I found that I could cd there, but I had to copy the file path from the Windows file explorer window, and then change all the slashes to forward slashes (/) from the Windows default back slashes (\).C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-32518095117873473132019-01-08T09:00:00.000-06:002019-01-08T09:00:04.485-06:00New paper out: Varying dataset resolution alters predictive accuracy of spatially explicit ensemble models for avian species distribution<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="false"
DefSemiHidden="false" DefQFormat="false" DefPriority="99"
LatentStyleCount="371">
<w:LsdException Locked="false" Priority="0" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index 9"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" Name="toc 9"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="header"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footer"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="index heading"/>
<w:LsdException Locked="false" Priority="35" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of figures"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="envelope return"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="footnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="line number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="page number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote reference"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="endnote text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="table of authorities"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="macro"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="toa heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Bullet 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Number 5"/>
<w:LsdException Locked="false" Priority="10" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Closing"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Signature"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="true"
UnhideWhenUsed="true" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="List Continue 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Message Header"/>
<w:LsdException Locked="false" Priority="11" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Salutation"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Date"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text First Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Note Heading"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Body Text Indent 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Block Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Hyperlink"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="FollowedHyperlink"/>
<w:LsdException Locked="false" Priority="22" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Document Map"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Plain Text"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="E-mail Signature"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Top of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Bottom of Form"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal (Web)"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Acronym"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Address"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Cite"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Code"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Definition"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Keyboard"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Preformatted"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Sample"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Typewriter"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="HTML Variable"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Normal Table"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="annotation subject"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="No List"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Outline List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Simple 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Classic 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Colorful 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Columns 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Grid 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 4"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 5"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 6"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 7"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table List 8"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table 3D effects 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Contemporary"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Elegant"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Professional"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Subtle 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 1"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 2"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Web 3"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Balloon Text"/>
<w:LsdException Locked="false" Priority="39" Name="Table Grid"/>
<w:LsdException Locked="false" SemiHidden="true" UnhideWhenUsed="true"
Name="Table Theme"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" SemiHidden="true" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" QFormat="true"
Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" QFormat="true"
Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" QFormat="true"
Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" QFormat="true"
Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" QFormat="true"
Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" QFormat="true"
Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" SemiHidden="true"
UnhideWhenUsed="true" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" SemiHidden="true"
UnhideWhenUsed="true" QFormat="true" Name="TOC Heading"/>
<w:LsdException Locked="false" Priority="41" Name="Plain Table 1"/>
<w:LsdException Locked="false" Priority="42" Name="Plain Table 2"/>
<w:LsdException Locked="false" Priority="43" Name="Plain Table 3"/>
<w:LsdException Locked="false" Priority="44" Name="Plain Table 4"/>
<w:LsdException Locked="false" Priority="45" Name="Plain Table 5"/>
<w:LsdException Locked="false" Priority="40" Name="Grid Table Light"/>
<w:LsdException Locked="false" Priority="46" Name="Grid Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="Grid Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="Grid Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="Grid Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="Grid Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="Grid Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="Grid Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="Grid Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="Grid Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="Grid Table 7 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="46" Name="List Table 1 Light"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark"/>
<w:LsdException Locked="false" Priority="51" Name="List Table 6 Colorful"/>
<w:LsdException Locked="false" Priority="52" Name="List Table 7 Colorful"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 1"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 1"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 1"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 1"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 1"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 1"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 2"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 2"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 2"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 2"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 2"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 2"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 3"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 3"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 3"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 3"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 3"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 3"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 4"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 4"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 4"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 4"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 4"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 4"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 5"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 5"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 5"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 5"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 5"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 5"/>
<w:LsdException Locked="false" Priority="46"
Name="List Table 1 Light Accent 6"/>
<w:LsdException Locked="false" Priority="47" Name="List Table 2 Accent 6"/>
<w:LsdException Locked="false" Priority="48" Name="List Table 3 Accent 6"/>
<w:LsdException Locked="false" Priority="49" Name="List Table 4 Accent 6"/>
<w:LsdException Locked="false" Priority="50" Name="List Table 5 Dark Accent 6"/>
<w:LsdException Locked="false" Priority="51"
Name="List Table 6 Colorful Accent 6"/>
<w:LsdException Locked="false" Priority="52"
Name="List Table 7 Colorful Accent 6"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]--><span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">I'm pleased to announce that the first paper from my postdoc with <a href="http://thebridgelab.oucreate.com/" target="_blank">Eli Bridge</a> has been <a href="http://dx.doi.org/10.1002/ece3.4725" target="_blank">published (open access!) in Ecology and Evolution</a>. We compared spatially explicit species distribution models to those without spatial averaging and found that accuracy varied by species and data resolution. Code and data are <a href="https://doi.org/10.5061/dryad.7m13q9b" target="_blank">available on datadryad.org.</a> I'd love to hear from anyone who tries out the code on their own studies, as it seems this area needs more work to determine better practices for modeling.</span><br />
<br />
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;">As a librarian here at OU now, I would like to highlight that the <a href="https://libraries.ou.edu/content/open-access-oa-subvention-fund-policy" target="_blank">OU Libraries' Open Access Subvention Fund</a> helped us publish this by covering the article processing charges (aka page charges). If you're at OU, do check out the fund eligibility, and if you're not at OU, please check your library to see if they do the same. </span><br />
<br />
<span style="font-family: "Times New Roman",serif; font-size: 12.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-fareast-theme-font: minor-latin;"><br />
</span>C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-28869890446555535992018-05-15T09:32:00.001-05:002018-05-15T09:36:26.579-05:00Migration counts using moon-watching in the Bridge labMy <a href="http://wesleythoneycutt.com/" target="_blank">fellow postdoc</a> in the <a href="http://thebridgelab.oucreate.com/" target="_blank">Bridge lab</a> is organizing a great crowdfunding effort to fund LunAero, the first fully automated bird migration counter using the moon. Please visit <a href="https://thousandsstrong.ou.edu/project/10280" target="_blank">here</a> to find out more and make a contribution before June 29!C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-59302341952757686812018-03-06T09:00:00.000-06:002018-03-06T09:00:00.422-06:00New paper out: Noise source and individual physiology mediate effectiveness of bird songs adjusted to anthropogenic noiseI'm very excited to announce that another paper from my postdoctoral work in Canada came out last week in <a href="http://rdcu.be/H9y8" target="_blank">Scientific Reports</a>. It is available open access and I'm very proud of the experiments we did for it. We looked at whether adjustments to noise in Savannah Sparrow songs were necessary and effective at two different types of oil well infrastructure. It turns out they were, but the necessity of these adjusted songs varied with the physiological state of the birds.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-70682738710276414152018-02-13T09:00:00.000-06:002018-02-13T09:00:04.661-06:00Haplotype pie charts: automated pie colors!Recently I have been polishing up some genetics work and I was frustrated at the prospect of having to re-color the haplotype network figures by hand at least once more. This drove me to see if I could finally get the R package 'igraph' working. Sure enough, I was able to get it to work! Here is <a href="http://www.cmcurry.com/2014/02/workflow-going-from-geneious-to-r-to.html" target="_blank">the link to the updated original post</a> with code and instructions.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-81345499899418688282017-12-12T09:00:00.000-06:002017-12-12T09:00:00.470-06:00New paper out: Noise from four types of extractive energy infrastructure affects song features of Savannah SparrowsMy post-doctoral work on bioacoustics of anthropogenic noise has resulted in <a href="http://americanornithologypubs.org/doi/abs/10.1650/CONDOR-17-69.1">another publication</a>, this time in The Condor: Ornithological Applications. <a href="http://www.animal-acoustics.com/">Miya Warrington</a> of St. George's University took the lead on this paper. We discuss how four different types of energy extraction infrastructure affect whole songs and syllables of Savannah Sparrows.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-29444235368094298812017-03-07T09:30:00.000-06:002017-03-07T09:30:05.416-06:00New paper out: Ability to alter song in two grassland songbirds exposed to simulated anthropogenic noise is not related to pre-existing variabilityExciting news! The first paper from my experimental work as a post-doc at the University of Manitoba has been published in <a href="http://www.tandfonline.com/doi/full/10.1080/09524622.2017.1289123">Bioacoustics</a>. We compared how Baird's and Savannah sparrows alter their songs in the presence of simulated oil well drilling noise, and found that they both altered their songs in response to noise. This was in spite of the fact that Savannah Sparrow has much more species-level variation in song relative to Baird's Sparrow. <a href="http://www.tandfonline.com/doi/full/10.1080/09524622.2017.1289123">Read all about it</a>!C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-71774634696813257092017-01-24T09:30:00.000-06:002017-01-24T09:30:17.039-06:00Using R to work through Sokal and Rohlf's Biometry: Chapter 6 (The Normal Probability Distribution), section 6.6<div style="background-color: white; font-stretch: normal; line-height: normal; margin: 0.75em 0px 0px; position: relative;">
<div style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 22px; font-weight: normal;">
<span style="font-size: 13.2px;">Previously in this series: </span><span style="font-family: inherit; font-size: 13.2px;"><a href="http://www.cmcurry.com/2017/01/chapter-6-normal-probability.html" style="color: #7c7c7c; text-decoration: none;" target="_blank">Chapter 6 (The Normal Probability Distribution), sections 6.3-6.5</a>.</span></div>
<div style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 22px; font-weight: normal;">
<span style="font-family: inherit; font-size: 13.2px;"><br /></span></div>
<h3>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">Section 6.6 Skewness and Kurtosis</span></span></h3>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px;">#Box 6.1 shows how to compute g1 (skewness) and g2 (kurtosis) from a frequency distribution.</span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">#This is unlike to be how one would do it with your own table of data, </span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">#but it is a helpful exercise in understanding how these moment statistics work and coding.</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">#This section assumes you have loaded the birthweights data from <a href="http://www.cmcurry.com/2017/01/chapter-6-normal-probability.html" target="_blank">the last post</a>.</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"><br /></span></span>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">mean.bw<-sum(birthweights[-16, "frequencies"]*(birthweights[-16, "classmark"]))/samplesize</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">yfreq<-(</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> birthweights[-16, "classmark"]-mean.bw #This is deviation from the mean (see pg 51, section 4.7)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"><br /></span></span>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">(g1<-(</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> samplesize*</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> sum(birthweights[-16, "frequencies"]*yfreq^3)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )/</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (samplesize-1)*(samplesize-2)*birthweights.sd^3</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"><br /></span></span>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"><br /></span></span>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">(g2<-(</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (samplesize+1)*samplesize*sum(birthweights[-16, "frequencies"]*yfreq^4)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )/</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (samplesize-1)*(samplesize-2)*(samplesize-3)*(birthweights.sd^4)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )-</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> 3*(samplesize-1)^2</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )/</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> (samplesize-2)*(samplesize-3)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"> )</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">)</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;"><br /></span></span>
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">#As an interesting side note, if you use the value of the mean given in the book,</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">birthweights.mean</span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">#which is rounded to four decimal places, the calculation for cubing </span></span><br />
<span style="font-size: 13.2px;"><span style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 13.2px;"></span></span><br />
<span style="font-family: arial, tahoma, helvetica, freesans, sans-serif;"><span style="font-size: 13.2px;">#(and raising to the power of 4) both were off. The power of three one was off by 118!</span></span><br />
<div style="font-family: arial, tahoma, helvetica, freesans, sans-serif; font-size: 22px; font-weight: normal;">
<br /></div>
</div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-61964366765094792732017-01-17T09:30:00.000-06:002017-01-17T09:30:08.372-06:00Git Large File SystemOne of my projects needs some pretty big datasets that github can't handle by itself. Its error message helpfully suggested I install Git Large File System (LFS). <br />
<br />
So, I downloaded and installed it. Then you need to <a href="https://help.github.com/articles/installing-git-large-file-storage/">initialize</a> it. I tried it first in the git shell from RStudio but that didn't work (said it was not a command), so I tried opening a regular command prompt. There "git lfs install" worked (it said "Git LFS initialized").<br />
<br />
Next, I needed to track some giant .csv files, but I didn't want to track all .csv files. The main instructions for using LFS call for <a href="https://help.github.com/articles/configuring-git-large-file-storage/">tracking given file extensions</a>. <br />
<br />
This part was me noodling around and it didn't work, but has other ideas that might work for other situations. I found a modification for a single file tracking though, so I can <a href="http://stackoverflow.com/questions/35328810/use-git-lfs-to-track-a-large-binary-file-without-a-file-extension">track only some files by putting them in a folder</a> (all the big ones). I tried following instructions for uploading a file here, but nothing happened when I tried the first file. I realized it might be too small, so I put a bigger file in (>100 MB) and it still didn't work. I tried just doing a single file and that didn't do it. ls-files and lfs status still doesn't show it. Modifying just to do all .csv files seems to modify them, which is not what I wanted. So I <a href="https://github.com/blog/2019-how-to-undo-almost-anything-with-git">went back to the last good version</a> (using <span style="font-family: Courier New, Courier, monospace;">git reset --hard SHAnumber</span>). Unfortunately, somehow reset kept locking up RStudio. I finally got it to open when I paused my computer's Dropbox syncing (I was on a very slow connection) and also opened the project not from the recent projects menu. Not sure if one or both of those helped. Then I got the .csv files that had been modified to go away when I deleted the .gitattributes (not my custom.gitattributes file) that had LFS settings in it (apparently track/untrack just writes to .gitattributes).<br />
<br />
Once I was reset back to where I was before I started messing with everything, I tried again with <a href="http://stackoverflow.com/questions/35769330/git-lfs-track-folder-recursively">tracking the folder AND ITS CONTENTS</a>. This does it!<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">git lfs track "myfolder/**"</span><br />
<div>
<br /></div>
However, it won't show anything staged in regular git status or git lfs ls-files <a href="https://github.com/git-lfs/git-lfs/issues/700">until commited</a>. you have to do <span style="font-family: Courier New, Courier, monospace;">git lfs status</span>.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-69750991777733018792017-01-10T09:30:00.000-06:002017-01-16T11:37:19.411-06:00Using R to work through Sokal and Rohlf's Biometry: Chapter 6 (The Normal Probability Distribution), sections 6.3-6.5Previously in this series: <span style="font-family: inherit;"><a href="http://www.cmcurry.com/2016/12/using-r-to-work-through-sokal-and.html">Chapter 6 (The Normal Probability Distribution), sections 6.1-6.2</a>.</span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<div>
<h3>
Section 6.3 A Model for the Normal Distribution</h3>
<div>
#This section describes what produces a normal distribution and</div>
<div>
#a heuristic showing how it is related to the binomial distribution.</div>
<div>
<br /></div>
<h3>
Section 6.4 Applications of the Normal Distribution</h3>
<div>
#This section describes how to do what we did to get Table 6.1,</div>
<div>
#but with a different set of data back from <a href="http://www.cmcurry.com/2014/07/using-r-to-work-through-sokal-and.html">Section 4.2</a>.</div>
<div>
<br /></div>
<div>
mean.bw<-109.9</div>
<div>
sd.bw<-13.593</div>
<div>
<br /></div>
<div>
(sdeviate.bw<-(151-mean.bw)/sd.bw)</div>
<div>
<br /></div>
<div>
pnorm(sdeviate.bw) #This value is more precise</div>
<div>
pnorm(3.02) #But the book uses this rounded value so we will too here.</div>
<div>
#We can do some of the calculations the book does on pp. 103-104.</div>
<div>
#Only a very few individuals are higher than 151 oz.</div>
<div>
1-pnorm(3.02)</div>
<div>
#If we want to look both directions we can double this number since the distribution is symmetrical.</div>
<div>
2*(1-pnorm(3.02))</div>
<div>
<br /></div>
<div>
#By default, lower.tail=TRUE in pnorm.</div>
<div>
pnorm(3.02,</div>
<div>
lower.tail=FALSE)</div>
<div>
#It is the same as our earlier value of</div>
<div>
1-pnorm(3.02)</div>
<div>
#Here is the default setting for comparison.</div>
<div>
pnorm(3.02,</div>
<div>
lower.tail=TRUE)</div>
<div>
#This simply tells use which direction we want to look at,</div>
<div>
#the upper or lower tail of the distribution from our value of standard deviate. </div>
<div>
<br /></div>
<div>
<h3>
Section 6.5 Fitting a Normal Distribution to Observed Data</h3>
</div>
<div>
<br /></div>
<div>
#These data are again from <a href="http://www.cmcurry.com/2014/07/using-r-to-work-through-sokal-and.html">Section 4.2</a>.</div>
<div>
classmark<-seq(from=59.5, to=171.5, by=8)</div>
<div>
frequencies<-c(2,6,39,385,888,1729,2240,2007,1233,641,201,74,14,5,1)</div>
<div>
samplesize<-sum(frequencies) #This confirms that we entered the data correctly, and gets our sample size.</div>
<div>
#Multiply classmark and frequencies to get the sums for each class.</div>
<div>
classsums<-classmark*frequencies</div>
<div>
<br /></div>
<div>
#To look at all this stuff together, combine it into a dataset.</div>
<div>
birthweights<-data.frame(cbind(classmark, frequencies, classsums))</div>
<div>
<br /></div>
<div>
#Add on a row of the next class up which contains 0 individuals.</div>
<div>
(birthweights<-rbind(birthweights, c(179.5, 0, 0)))</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
#On page 104, equation 6.2 is like equation 6.1 above but with sample size (n) and i (class intervals).</div>
<div>
normal.manual.applied<-function(mean, sd, n, i){</div>
<div>
curve(((1/(sd*sqrt(2*pi)))*exp((-((x-mean)/sd)^2)/2))*n*i,</div>
<div>
-4, 4, #go from -4 to +4 standard deviations.</div>
<div>
add = FALSE,</div>
<div>
ylab="freq",</div>
<div>
xlab="Y",</div>
<div>
type = "l")</div>
<div>
}</div>
<div>
<br /></div>
<div>
normal.manual.applied(mean=0, sd=1, n=1000, i=0.5)</div>
<div>
#This gives the curve that Table 6.1 also has (same class intervals of 0.5, 1000 samples, and mean=0 with sd=1).</div>
<div>
#Let's do this with the birthweights data.</div>
<div>
<br /></div>
<div>
birthweights.mean<-109.8996</div>
<div>
birthweights.sd<-13.5942</div>
<div>
<br /></div>
<div>
#Like above we need the lower boundaries of the class marks.</div>
<div>
birthweights$boundaries<-birthweights$classmark-4</div>
<div>
<br /></div>
<div>
#Get the expected frequencies for the class boundaries with the mean and sd of our dataset.</div>
<div>
birthweights$pnorm.results<-pnorm(birthweights$boundaries,</div>
<div>
mean=birthweights.mean,</div>
<div>
sd=birthweights.sd)</div>
<div>
<br /></div>
<div>
#Then, take the difference of the first row minus the next row.</div>
<div>
#The last row will not have anything, which is why we needed to add the lower boundary of</div>
<div>
#the next class mark, which has a frequency of zero. Thus, this calculation generates a vector of length 14. </div>
<div>
#We need 15, so we just add a zero on for the last difference as they do in Table 6.2</div>
<div>
birthweights$expected.freqs<-c(abs(diff(birthweights$pnorm.results)),0) #add a zero on for the last difference</div>
<div>
<br /></div>
<div>
#Multipy the frequencies by the sample size to get the expected frequencies for a sample of this size.</div>
<div>
#Round as in the table.</div>
<div>
birthweights$expected.freqs.values<-round(birthweights$expected.freqs*samplesize, 1)</div>
<div>
<br /></div>
<div>
#We can even add the plus and minus signs using ifelse and sign() to see in which direction the differences are.</div>
<div>
birthweights$departure.signs<-ifelse(sign(birthweights$frequencies-birthweights$expected.freqs.values)==-1,</div>
<div>
"-", #if -1, then write "-"</div>
<div>
"+") #else if not -1, write "+"</div>
<div>
<br /></div>
<div>
#View the table to confirm it has the same data as Table 6.2.</div>
<div>
birthweights</div>
</div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-9246266595935019102016-12-20T09:30:00.000-06:002016-12-20T09:30:40.540-06:00Using R to work through Sokal and Rohlf's Biometry: Chapter 6 (The Normal Probability Distribution), sections 6.1-6.2Previously in this series: <a href="http://www.cmcurry.com/2016/11/using-r-to-work-through-sokal-and_29.html">Chapter 5 (Descriptive Statistics), section 5.5 and selected exercises</a>.<br />
<br />
Chapter 6 moves on from discrete distributions to the normal distribution,<br />
#a continuous distribution that will be the basis of most statistics in the book.<br />
<br />
<h3>
Section 6.1 Frequency Distributions of Continuous Variables</h3>
A brief discussion of the section header's topic, nothing to code here.<br />
<h3>
Section 6.2 Properties of the Normal Distribution</h3>
<br />
#Let's check where it is.<br />
?Distributions<br />
?dnorm<br />
<br />
#We can draw the normal distribution in a custom function as a plot using curve()<br />
#and equation 6.1 on page 95.<br />
normal.manual<-function(mean, sd){<br />
curve((1/(sd*sqrt(2*pi)))*exp((-((x-mean)/sd)^2)/2),<br />
-4, 4, #go from -4 to +4 standard deviations.<br />
add = FALSE,<br />
ylab="freq",<br />
xlab="Y",<br />
type = "l")<br />
}<br />
normal.manual(0,1)<br />
<br />
#You can get this automatically in R with dnorm.<br />
curve(dnorm(x, mean=0, sd=1),<br />
-4, 4,<br />
col="white",<br />
lty="dashed",<br />
add=TRUE)<br />
#I added a white dashed line over the original black line so you can see that they follow the same path.<br />
<br />
#You can draw any of the distributions in Figure 6.2 using these functions<br />
#(either the R one or the one we just made).<br />
<br />
#Figure 6.3 shows the cumulative normal distribution function.<br />
<br />
#Let's do that and then plot the normal probability density function on it.<br />
#Cumulative first since that plot will go from 0 to 1.<br />
curve(pnorm(x, mean=0, sd=1),<br />
-4, 4,<br />
lty="solid")<br />
<br />
#Then add the normal probability density function (like the one we made earlier, just with the default line color).<br />
curve(dnorm(x, mean=0, sd=1),<br />
-4, 4,<br />
lty="dashed",<br />
add=TRUE)<br />
<br />
#To get out some of the values shown in page 96, we use pnorm().<br />
#http://stackoverflow.com/questions/34236648/r-function-to-calculate-area-under-the-normal-curve-between-adjacent-standard-de<br />
<br />
pnorm(0, mean=0, sd=1)<br />
#Just adding one value gives you a point estimate.<br />
#50% will be found up to zero (the mean).<br />
<br />
#The other values shown in Figure 6.3<br />
pnorm(-1)<br />
pnorm(-2)<br />
#0 and 1 are the default values for mean and standard deviation, so you can leave them out if you want in this case.<br />
#If you add more than one, it will tell you the values.<br />
(pnorm(0:1))<br />
#Use diff as suggested here to get the area under the curve.<br />
diff(pnorm(0:1))<br />
#This works because it uses the cumulative function to calculate it.<br />
#If you go from -1 to 1 you can add them up to get the 68.27% shown under Figure 6.2 and on page 96.<br />
sum(diff(pnorm(-1:1)))<br />
<br />
#To go the other way, i.e. to see where 50% of the items fall, you have to use qnorm.<br />
#Let's see what qnorm looks like.<br />
curve(qnorm(x))<br />
#It is essentially tipping Figure 6.3 on its side.<br />
#The frequency is now x on the x-axis, and the standard deviations are the y axis.<br />
#You can get the point values in Figure 6.3 this way:<br />
qnorm(0.5)<br />
qnorm(0.1587)<br />
qnorm(0.0228)<br />
#The last two are close with rounding since those values in Figure 6.3 were rounded.<br />
#How to get the values on page 96, of where 50%, 95%, etc of items are found?<br />
qnorm(0.5+0.5*0.5)<br />
qnorm(0.95+0.5*0.05)<br />
qnorm(0.99+0.5*0.01)<br />
#The values that you input are not the percent values given on page 96.<br />
#You put them in proportions (the quantile you want to get) PLUS<br />
#half of the remaining value.<br />
#If you put in 0.95, it will go from 0 to 0.95. That isn't centered at the mean of 0,<br />
#where the 50% quantile is. There is 0.05 left at the end. So we divide it by two<br />
#to put it on either end.<br />
#You would get the negative number for the standard deviation if you put in the opposite value.<br />
qnorm(0.5*0.01)<br />
#This also explains it nicely down where it starts talking about qnorm.<br />
#https://cran.r-project.org/web/packages/tigerstats/vignettes/qnorm.html<br />
<br />
#On pg. 98, they show calculation of standard deviates.<br />
#This is described in such a way that they seem to be z scores although they are never named as such in the book.<br />
#You can easily calculate this manually.<br />
z.score<-function(x){<br />
(x-mean(x))/sd(x)<br />
}<br />
<br />
x<-c(1,2,3)<br />
z.score(x)<br />
#You can also use the scale() function.<br />
#https://www.r-bloggers.com/r-tutorial-series-centering-variables-and-generating-z-scores-with-the-scale-function/<br />
<br />
scale(x,<br />
center=TRUE,<br />
scale=TRUE)<br />
#help notes that scale=TRUE divides by the standard deviation when<br />
#center=TRUE, and center=TRUE substracts each number by the column mean.<br />
#This is the same thing we did in the z-score function.<br />
<br />
#Table 6.1 has expected frequencies for the normal distribution in column 2 for a sample of 1000 individuals.<br />
#We can generate this with pnorm() and thinking about what the class marks mean.<br />
#Because the class marks are separated by 0.5, we need to go 0.5 around each class mark and start at -5.25.<br />
boundaries<-seq(from=-5.25,<br />
to=5.25,<br />
by=0.5)<br />
<br />
pnorm.results<-pnorm(boundaries)<br />
expected.freqs<-abs(diff(pnorm.results))<br />
cbind(boundaries[-length(boundaries)]+0.25,<br />
#this takes the last entry off because we only need the lower bound for each class,<br />
#and adds 0.25 to get the class mark.<br />
round(expected.freqs*1000, 1))<br />
#Then you can have a look at the table and see that it gives the same results as column 2 in Table 6.1.<br />
<div>
<br /></div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-46233679346111830062016-11-29T09:30:00.000-06:002017-01-04T12:27:37.073-06:00Using R to work through Sokal and Rohlf's Biometry: Chapter 5 (Descriptive Statistics), section 5.4 and selected exercisesPreviously in<span style="font-family: inherit;"> this series: <span style="background-color: white;"><a href="http://www.cmcurry.com/2016/11/using-r-to-work-through-sokal-and_15.html">Chapter 5 (Descriptive Statistics), section 5.3.</a></span></span><br />
<span style="font-family: inherit;"><br /></span>
<br />
<h3>
Section 5.4: Other Discrete Probability Distributions</h3>
?dhyper #hypergeometric<br />
?dmultinom #multinomial<br />
?dnbinom #negative binomial<br />
#There are also options in various packages later for regression to use different distributions,<br />
#although of these I've only ever used negative binomial.<br />
<br />
#The logarithmic distribution requires an extra package.<br />
#https://cran.r-project.org/web/views/Distributions.html<br />
#extraDistr, VGAM, or gamlss.dst<br />
#I installed extraDistr to test it out.<br />
library(extraDistr)<br />
?LogSeries<br />
#and<br />
?dlgser #The distributions in this package follow the same us of d, p, and q prefixes.<br />
<br />
<br />
<h3>
Exercises 5</h3>
#I'm doing the exercises that require new coding beyond what we have done already.<br />
<br />
#Exercise 5.5<br />
#The organism is present or absent in any given slide, assuming the person is diseased<br />
#(if the person has the disease, their samples contain the organism but it's not very common).<br />
#We want a false negative <1% of the time. The organism is visible in 20% of the slides.<br />
#At first I thought this was a Bayesian problem but I don't see how to do it that way.<br />
#p=0.2 (organism visible), thus q=0.8 (organism present but not visible).<br />
#We need to find the power of q=0.8 that equals 0.01 or smaller<br />
#(1% false negative, which would be present but not visible).<br />
#So, I made a while loop that cycled through to see how many times we need to raise 0.8<br />
#to get to 0.01. <a href="http://www2.warwick.ac.uk/fac/sci/moac/degrees/moac/ch923/r_introduction/r_programming/">This explanation</a> helped me figure out how to do this type of loop.<br />
<br />
n<-0<br />
i<-1<br />
print(n)<br />
while (i > 0.01) {<br />
print(i)<br />
print(n)<br />
i<-0.8^n<br />
n=n+1<br />
}<br />
#the last number printed is the number of slides needed.<br />
<div>
<br /></div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-62979027320681864522016-11-15T09:30:00.000-06:002016-11-15T09:30:08.519-06:00Using R to work through Sokal and Rohlf's Biometry: Chapter 5 (Descriptive Statistics), section 5.3Previously in this series: <a href="http://www.cmcurry.com/2016/11/using-r-to-work-through-sokal-and.html" target="_blank">Chapter 5 (Introduction to Probability Distributions: Binomial and Poisson), sections 5.1-5.2.</a><br />
<br />
<h3>
Section 5.3: the Poisson distribution</h3>
?Distributions #Let's look in help again to find the Poisson distribution.<br />
?dpois #We can see that R does similar calculations for Poisson in addition to the binomial distribution.<br />
<br />
#To get column 3 (expected absolute frequencies) in table 5.5,<br />
#there is the recursion formula given in equations 5.11 and 5.12.<br />
#5.12 is for calculations with sample means to get the relative expected frequency,<br />
#and in the text below it notes what term to add to get the absolute ones given in column 3 of table 5.5<br />
<br />
abs.expected.freq.pois<-400*dpois(c(0:9),<br />
lambda=1.8,<br />
log=FALSE)<br />
<br />
#I also want to do equation 5.12 manually for relative expected frequencies.<br />
#This is not normally needed because R does it so nicely with the base stats function dpois().<br />
<br />
#Some reading:<br />
#http://stackoverflow.com/questions/5273857/are-recursive-functions-used-in-r<br />
#this one has a simple one for factorials that makes it clearest to me:<br />
#http://www.programiz.com/r-programming/recursion<br />
<br />
rel.exp.freq.pois<-function(samplemean, i) {<br />
if (i==0) return (exp(-samplemean))<br />
else return (rel.exp.freq.pois(samplemean,<br />
i-1)*(samplemean/i))<br />
}<br />
<br />
#To get absolute frequencies, multiply by 400.<br />
#For one example:<br />
400*rel.exp.freq.pois(1.8, 1)<br />
<br />
#To get all the frequencies at once, use lapply.<br />
rel.freq.pois<-unlist(lapply(c(0:9),<br />
rel.exp.freq.pois,<br />
samplemean=1.8))<br />
(abs.freq.pois<-400*rel.freq.pois)<br />
<br />
#On page 82, they show how to calculate the coefficient of dispersion. Here is a function that will do it.<br />
coefficient.of.dispersion<-function(data) {<br />
var(data)/mean(data)<br />
}<br />
#You can input any set of data here and get the coefficient of dispersion.<br />
<br />
#Figure 5.3 shows Poisson distributions with different means.<br />
#We can make this with the dpois() function generating y data.<br />
#Oddly, to add the extra lines, it is easiest to use points() with<br />
#type="l" (for lines).<br />
plot(dpois(c(0:18),<br />
lambda=0.1,<br />
log=FALSE),<br />
type="l",<br />
ylab="Relative expected frequency",<br />
xlab="Number of rare events per sample")<br />
points(dpois(c(0:18),<br />
lambda=1,<br />
log=FALSE),<br />
type="l")<br />
points(dpois(c(0:18),<br />
lambda=2,<br />
log=FALSE),<br />
type="l")<br />
points(dpois(c(0:18),<br />
lambda=3,<br />
log=FALSE),<br />
type="l")<br />
points(dpois(c(0:18),<br />
lambda=10,<br />
log=FALSE),<br />
type="l")<br />
<br />
#The remaining tables and examples in this section do not add anything new to code.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-18949861152703825832016-11-08T09:30:00.000-06:002016-11-08T09:30:00.184-06:00Using R to work through Sokal and Rohlf's Biometry: Chapter 5 (Introduction to Probability Distributions: Binomial and Poisson), sections 5.1-5.2 Previously in this series: <a href="http://www.cmcurry.com/2016/04/using-r-to-work-through-sokal-and.html" target="_blank">Chapter 4 exercises (in Sokal and Rohlf's Biometry).</a><br />
<br />
Chapter 5 mostly covers the binomial and Poisson distributions, and briefly mentions hypergeometric, multinomial, negative binomial, and logarithmic. <br />
<h3>
<br />Section 5.1</h3>
This section talks about probability theory, unions, intersections, independence,<br />
#conditional probability, and Bayes' theorem (which apparently will not be used in the rest of the book).<br />
<br />
<h3>
Section 5.2: the binomial distribution</h3>
?Distributions #to see distributions available in 'stats'.<br />
?dbinom #to see what you can do with binomial distribution in particular.<br />
<br />
#Let's generate table 5.1 and figure 5.2 (bar graph side by side).<br />
#The remaining tables in section 5.2 would use similar code.<br />
<br />
#You can get the binomial coefficient equation 5.9 by hand using factorial()<br />
#For example on page 71 in table 5.1, they give an example of a sample of 5 containing 2 of the infected insects.<br />
#to population a table with coefficients and powers of p and q (columns 3 and 4 in table)<br />
factorial(5)/(factorial(2)*factorial(5-2))<br />
#Yes, this gives us 10 just like in table 5.1, column 2, for 2 infected insects.<br />
<br />
#You can do this more simply using the choose() function.<br />
#Beware the different use of k in the R function versus the book.<br />
choose(n=5, #n is the size of the sample. "k" in book.<br />
k=2) #k is the place in the coefficient, starting at 0 (number infected, number whatever); "Y" in book.<br />
<br />
#To get the values in column 3 and 4 of table 5.1, except for the power of 0, which is 1 and not calculated here.<br />
poly(0.4, degree=5, raw=T)<br />
poly(0.6, degree=5, raw=T)<br />
#You will note taht the numbers for 0.6 (powers of q) are reversed in column 4.<br />
#When you note that the number of uninfected insects per sample will be just opposite of infected insects (in column 1)<br />
#this makes more sense.<br />
<br />
#To get the relative expected frequencies (column 5), use dbinom and pbinom.<br />
#http://www.r-tutor.com/elementary-statistics/probability-distributions/binomial-distribution<br />
<br />
(rel.expected.freq<-dbinom(c(0,1,2,3,4,5), size=5, prob=0.4))<br />
#density is book's relative frequencies.<br />
(pbinom(c(0,1,2,3,4,5), size=5, prob=0.4))<br />
#to contrast, this adds up the densities/relative frequencies.<br />
<br />
#To get column 6, the absolute expected frequencies, multiply rel.expected.freq by the actual sample size.<br />
(abs.expected.freq<-2423*rel.expected.freq)<br />
<br />
#Now we'll use the abs.expected.freq plus the observed frequencies together to make a side-by-side barplot.<br />
obs.freq<-c(202,<br />
643,<br />
817,<br />
535,<br />
197,<br />
29)<br />
<br />
infected.freq<-rbind(obs.freq,<br />
abs.expected.freq)<br />
colnames(infected.freq)<-0:5<br />
rownames(infected.freq)<-c("Observed frequencies",<br />
"Expected frequencies")<br />
#Adding colnames and rownames gives the proper legend and x axis labels in the plot.<br />
<br />
#If you want to make a side-by-side barplot,<br />
#you need adjacent columns, the barplot() function,<br />
#and to specify beside=TRUE.<br />
barplot(infected.freq,<br />
beside = TRUE,<br />
ylab="Frequency",<br />
xlab="Number of infected insects per sample",<br />
axes=TRUE,<br />
legend.text = TRUE,<br />
args.legend=c(bty="n"))C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-63153904749996712542016-10-04T09:00:00.000-05:002016-11-14T14:37:05.101-06:00New paper out: Cattle grazing intensity and duration have varied effects on songbird nest survival in mixed-grass prairiesI'm a co-author on <a href="https://authors.elsevier.com/a/1U1E85WcHQt9ct" target="_blank">a new paper out in Rangeland Ecology and Management</a>. It's currently up online though it hasn't been assigned a volume/issue yet. We looked at effects of different grazing regimes (differing duration stocking rates) in Grasslands National Park (Saskatchewan, Canada) and nearby areas on nest survival, and found few effects overall. A few species had lowered nest survival in some years at low to moderate grazing intensities, such as Sprague's Pipit, Chestnut-collared Longspur, and Vesper Sparrow. Check it out!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-be3GQJ6CTb4/V_LvWN9oQrI/AAAAAAAAAs8/FByXVkSQkxokjEv62YlaiIk4brEiBHS-wCLcB/s1600/IMG_0002.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="425" src="https://2.bp.blogspot.com/-be3GQJ6CTb4/V_LvWN9oQrI/AAAAAAAAAs8/FByXVkSQkxokjEv62YlaiIk4brEiBHS-wCLcB/s640/IMG_0002.JPG" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Nestling Chestnut-collared Longspurs, near Brooks, Alberta, Canada. 14 June 2016.</td></tr>
</tbody></table>
<span id="goog_2018773275"></span><span id="goog_2018773276"></span><br />C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-45898166839947419742016-09-20T09:00:00.000-05:002016-11-04T21:14:41.699-05:00Basic version control with Git and GitHub in RStudio in both Windows and UbuntuI don't remember why, but a few months ago I decided I finally had to try out this "version control" thing. I love it SO MUCH. Github and git can be a bit confusing initially, especially as I had the added layers of making it work with RStudio and on two different operating systems, but now that I've got it going it's great.<br />
<br />
I started and installed git with <a href="http://www.molecularecologist.com/2013/11/using-github-with-r-and-rstudio/" target="_blank">this tutorial</a> for starting with RStudio and git/github on Windows. To understand how push and pull work (as this confused me), I read through several pages. I started with this <a href="https://www.git-tower.com/blog/workflow-of-version-control" target="_blank">graphic of the workflow</a>. That one ignores RStudio and is just about git and github. This essay has <a href="http://r-bio.github.io/intro-git-rstudio/" target="_blank">great illustrations and more details</a> (code to use in the shell/terminal in RStudio). Finally <a href="http://readwrite.com/2013/10/02/github-for-beginners-part-2/" target="_blank">this one is github/git only</a> (no RStudio) but I still found it helpful to read about push/pull/branching in yet another way.<br />
<br />
Next problem was that when I opened up my project on Ubuntu, git said all lines in files were modified when I had not actually changed all lines. This turned out to be an issue between <a href="http://adaptivepatchwork.com/2012/03/01/mind-the-end-of-your-line/" target="_blank">line endings in Windows and linux type systems</a>, and this would hide any actual changes if I had just made a few, so just committing every time was not a good option. I decided to go with adding a gitattributes file in each repository (so all users will get the same line endings regardless of who I share with). I added a gitattributes file (I combined <a href="https://github.com/Danimoth/gitattributes" target="_blank">general settings and the R settings available here</a>) into the main project directory. For a directory that I had already used a lot (so lots of files with the wrong line endings) I followed <a href="https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings" target="_blank">these steps for the per-repository settings</a>, including opening a shell in RStudio to input their code for refreshing my repository. (I backed up on a separate hard drive first in case I totally messed something up.) At first this didn't work, <a href="http://stackoverflow.com/questions/9976986/force-lf-eol-in-git-repo-and-working-copy" target="_blank">because I have a dual-boot situation, not using the files in two separate computers, according to this top answer</a>. I ran the two lines of code in the top answer's update and that fixed it.<br />
<span style="font-family: "courier new" , "courier" , monospace;">$ git config core.eol lf</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">$ git config core.autocrlf input</span><br />
<div>
<br /></div>
<div>
I now copy the custom attributes file into any new R repository I have, run those two lines, and haven't had any problems going between operating systems now. Keep in mind this is where I have two different operating systems accessing the SAME FILES on the SAME drive/partition. If I understand correctly the gitattributes file should work fine without the extra lines if you have different computers, but I have not yet tested this.</div>
<br />
Finally, when I tried pushing in RStudio to github, I kept getting two errors:<br />
<span style="font-family: "courier new" , "courier" , monospace;">error: unable to read askpass response from 'rpostback-askpass'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">fatal: could not read Username for 'https://github.com': No such device or address</span><br />
<br />
As I had already done the git config steps to add my github username and github email address, I looked up the error and found that I needed to create a private/public key pair because RStudio has issues authenticating apparently. I followed the top answer's links, which resulted in my <a href="https://github.com/OHI-Science/ohicore/issues/104" target="_blank">changing the url in the .config file</a> and then <a href="https://help.github.com/articles/generating-an-ssh-key/" target="_blank">generating and linking an SSH key.</a> I did this on both Ubuntu and Windows following the same instructions, resulting in two new key pairs (one for Ubuntu, one for Windows).<br />
<br />
<b>2016/11/04 edit:</b> I got the askpass response error again in a new repository, but on the same computer that already had the SSH keys. In this case I only changed the url in the .config file and then it worked swimmingly. I've also had consistent success with line endings using the custom .gitattributes file followed by the two git config commands above.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-63701173366584750132016-07-19T09:30:00.000-05:002016-07-19T09:30:27.270-05:00Dual-boot Ubuntu 16.04 with Windows 7, then upgrading to Windows 10I have a small Lenovo (ThinkPad X100e) running 32-bit Windows 7 Home edition. I wantd to add dual-boot, then upgrade to Windows 10 to test that it won't erase my Ubuntu partition.<br />
<br />
I first tried just running a bootable Ubuntu 16.04 LTS (long term stable) USB, and it got me into Ubuntu install, but when I got to the partitioning step the computer said okay, then shut down, and it never seemed to install. I suspected I might need to partition first. I pre-emptively went ahead on shrinking the Windows partition before repartitioning, following <a href="http://ubuntuforums.org/showthread.php?t=2087466&p=12372055#post12372055" target="_blank">these steps</a> as in my <a href="http://www.cmcurry.com/2015/07/setting-up-partitioning-on-my-dualboot.html" target="_blank">previous post</a> just adjusting steps by looking in Windows 7 places for the settings. System protection was already off and I skipped CHKDSK because Windows ran it on its own after my failed original Ubuntu automatic repartitioning attempts. My computer also insisted on rebooting between steps 4 and 5. Disk cleanup (step 5) took less than 20 minutes. Disk shrinking was maybe less than an hour.<br />
<br />
I also realized during the Windows shrinking that I was trying to install 64-bit Ubuntu (the main file that downloads) onto a 32-bit computer. I downloaded 32-bit from a mirror (there didn't seem to be an easy link on the main Ubuntu site, had to look around for it in their site) and made a new bootable USB. I tried again. At the partitioning step, I got a scary looking message about whether I wanted to continue with automatic partitioning (it said it will change and format some things). I answered continue, and then I went on with set up. That worked and I now have Ubuntu 16.04 LTS dual booting with Windows 7.<br />
<br />
This went a lot faster than with my last dual-boot setup. I think this was because I had Windows 7, an older laptop, and a bit more experience, and probably mostly because I cared less about whether I ruined my Windows set up. This older computer also didn't have weird boot settings that the newer one did (secure boot), nor did it have Windows 8 hibernation and fast shutdown/startup to worry about. I also did not want to set up a shared data partition on this laptop so that did not take up any time. So I did less prep, and it still turned out okay. Your results may vary. <br />
<br />
Now, the Windows 10 upgrade over the dual-boot system. I ended up not having enough space on my Windows partition because I had some duplicate users and all their data. I uninstalled a few large programs that I didn't use any more and then removed the two duplicate users and their data (be careful with this! I was very sure I did not need those user profiles). After following the various on-screen prompts, I eventually got a message that I had to log into my administrator account. I did so, waited for the download again, and then the Windows 10 upgrade just... failed, every time, even though I was booting back into Windows 7 and not Ubuntu. With the error code, I found that I should be <a href="http://answers.microsoft.com/en-us/windows/forum/windows_10-windows_install/win-10-pro-install-fails-with-error-c1900101-20017/ef56c7f6-dbd8-457e-a495-481074b90af7?page=18&auth=1" target="_blank">rebooting into the system recovery partition</a>. I did that and sure enough, it worked! The install crashed once because my laptop overheated, but that's my laptop's problem. I set it on an air vent in the house and the AC kept it cool enough to restore Windows 7 (Windows did this on its own). I then started the Windows 10 upgrade again and it finished the install. I missed a few reboots and it booted into Ubuntu, but in those instances I just rebooted and watched to select the Windows system recovery partition and it resumed where it had left off. Windows 10 did not erase my programs or apps, so I am pleased with how this went and might even try it on my main working computer now.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-84977651610982811232016-05-03T09:00:00.000-05:002016-05-03T09:00:06.336-05:00New paper out: "Shadow of a doubt"I am very pleased to announce that my behavioral work on reproductive isolation in hybridizing titmice has been accepted in <a href="http://link.springer.com/article/10.1007/s00265-016-2126-y" target="_blank">Behavioral Ecology and Sociobiology</a> and is now out as an online early! It was the main experimental work from my Ph.D. dissertation and is co-authored with my Ph.D. advisor Michael Patten.C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-42806998541261426062016-04-26T09:00:00.000-05:002016-04-26T09:00:20.964-05:00Using R to work through Sokal and Rohlf's Biometry: Chapter 4 (Descriptive Statistics), exercisesPreviously in this series: <a href="http://www.cmcurry.com/2014/10/using-r-to-work-through-sokal-and.html" target="_blank">Chapter 4 (sections 4.6-4.9 in Sokal and Rohlf's Biometry)</a>.<br />
<br />
I sure fell off the Sokal and Rohlf horse. Time to get back on track! Let's finish up Chapter 4. From this point onwards, I will do only the exercises that add to the code base I've written for the rest of the chapter. In this case there is just one.<br />
<br />
<h4>
Exercises 4 (selected)</h4>
#Exercise 4.3<br />
#Use the data to get mean, standard deviation, and coefficient of variation,<br />
#then repeat using groupings.<br />
e2.7<-c(4.32, 4.25, 4.82, 4.17, 4.24, 4.28, 3.91, 3.97, 4.29, 4.03, 4.71, 4.20,<br />
4.00, 4.42, 3.96, 4.51, 3.96, 4.09, 3.66, 3.86, 4.48, 4.15, 4.10, 4.36,<br />
3.89, 4.29, 4.38, 4.18, 4.02, 4.27, 4.16, 4.24, 3.74, 4.38, 3.77, 4.05,<br />
4.42, 4.49, 4.40, 4.05, 4.20, 4.05, 4.06, 3.56, 3.87, 3.97, 4.08, 3.94,<br />
4.10, 4.32, 3.66, 3.89, 4.00, 4.67, 4.70, 4.58, 4.33, 4.11, 3.97, 3.99,<br />
3.81, 4.24, 3.97, 4.17, 4.33, 5.00, 4.20, 3.82, 4.16, 4.60, 4.41, 3.70,<br />
3.88, 4.38, 4.31, 4.33, 4.81, 3.72, 3.70, 4.06, 4.23, 3.99, 3.83, 3.89,<br />
4.67, 4.00, 4.24, 4.07, 3.74, 4.46, 4.30, 3.58, 3.93, 4.88, 4.20, 4.28,<br />
3.89, 3.98, 4.60, 3.86, 4.38, 4.58, 4.14, 4.66, 3.97, 4.22, 3.47, 3.92,<br />
4.91, 3.95, 4.38, 4.12, 4.52, 4.35, 3.91, 4.10, 4.09, 4.09, 4.34, 4.09)<br />
<br />
#a. without groupings<br />
(e2.7.mean<-mean(e2.7))<br />
(e2.7.sd<-sd(e2.7))<br />
(cv.e2.7<-(e2.7.sd*100/e2.7.mean))<br />
<br />
#b. with groupings.<br />
#To create groupings, we use hist() but with plot=FALSE, which we did not use before.<br />
(e2.7.hist<-hist(e2.7,<br />
breaks=seq(min(e2.7),<br />
max(e2.7),<br />
length.out=11), #use 11 to get 10 groups (number of groups you want + 1)<br />
#R will chose binning automatically if you do not use the breaks argument.<br />
plot=FALSE))<br />
#It comes out as a list so we need the midpoints (or "class marks" in the books' terminology)<br />
#and the counts as a data frame.<br />
#We also multiply the two to get class sums as in section 4.1 (and box 4.2)<br />
(e2.7.grouped<-data.frame("frequencies"=e2.7.hist[[2]],<br />
"classmark"=e2.7.hist[[4]],<br />
"classsums"=e2.7.hist[[2]]*e2.7.hist[[4]]))<br />
<br />
(e2.7.samplesize<-sum(e2.7.grouped$frequencies))<br />
(e.2.7.summing<-sum(e2.7.grouped$classmark*e2.7.grouped$frequencies))<br />
(mean.moo<-e.2.7.summing/e2.7.samplesize)<br />
<br />
#These numbers are the same as before because I didn't code the class marks.<br />
#You can see how to do that in the <a href="http://www.cmcurry.com/2014/10/using-r-to-work-through-sokal-and.html" target="_blank">previous post</a>.<br />
#In the modern computing age we are unlikely to group the data to get averages,<br />
#but you can see where it would be useful if you are given data in that format,<br />
#or want to calculate by hand.<br />
<div>
<br /></div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-2676444567449400952016-04-05T09:00:00.000-05:002016-04-05T09:00:21.906-05:00Winter: the sequel<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://2.bp.blogspot.com/-MOmrJjlztmE/VwKaN_ue8SI/AAAAAAAAAmA/dsfneqIEMxIqBU3wTDHFPboRjFy7IZNHA/s1600/2016-03-20%2B13.30.25.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://2.bp.blogspot.com/-MOmrJjlztmE/VwKaN_ue8SI/AAAAAAAAAmA/dsfneqIEMxIqBU3wTDHFPboRjFy7IZNHA/s640/2016-03-20%2B13.30.25.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">The snow keeps melting and then coming back. Seven Sisters Falls, Manitoba. 20 March 2016.</td></tr>
</tbody></table>
<br />C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0tag:blogger.com,1999:blog-1741919674373449576.post-29328635666115694272016-03-22T09:00:00.001-05:002016-03-22T09:00:31.134-05:00Lichen adventure<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-mw5-MP9Hhog/VvA96aw7MdI/AAAAAAAAAls/HOr3CKuGr_Yqr1e7s66Bh8n-ibdyoznMQ/s1600/2016-03-20%2B12.12.05.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://3.bp.blogspot.com/-mw5-MP9Hhog/VvA96aw7MdI/AAAAAAAAAls/HOr3CKuGr_Yqr1e7s66Bh8n-ibdyoznMQ/s640/2016-03-20%2B12.12.05.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">A fallen <a href="https://www.phas.ubc.ca/~waltham/old/ubctree/Jack%20Pine/Jack%20Pine.html" target="_blank">jack pine</a> cone and twig in some neat lichen which might be <i><a href="http://www.fs.fed.us/database/feis/lichens/claspp/all.html" target="_blank">Cladonia</a></i>. 20 March 2016, east of Winnipeg, west of Elma, Manitoba.</td></tr>
</tbody></table>
<br />C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com1tag:blogger.com,1999:blog-1741919674373449576.post-31660355119649314222016-03-15T09:00:00.001-05:002016-03-15T16:41:52.088-05:00Latitude<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-4f5RIgftWe8/Vt8QHYpt_4I/AAAAAAAAAlM/FXLdXNRVy_A/s1600/2016-03-03%2B12.38.56.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="480" src="https://4.bp.blogspot.com/-4f5RIgftWe8/Vt8QHYpt_4I/AAAAAAAAAlM/FXLdXNRVy_A/s640/2016-03-03%2B12.38.56.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Sweet, sweet warmth and growing plants. 03 March 2016, Stillwater, Oklahoma.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-nagQCE7S3BU/VuB1ej4xHpI/AAAAAAAAAlc/VQzv4cFkdbE/s1600/2016-03-08%2B17.54.58.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="640" src="https://1.bp.blogspot.com/-nagQCE7S3BU/VuB1ej4xHpI/AAAAAAAAAlc/VQzv4cFkdbE/s640/2016-03-08%2B17.54.58.jpg" width="480" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Admittedly there IS a live plant in there, but it's not really doing much yet as the winter snow attempts to melt off. 08 March 2016, Winnipeg, Manitoba.</td></tr>
</tbody></table>
<div>
<br /></div>
C.M. Curryhttp://www.blogger.com/profile/02806528013031315657noreply@blogger.com0