<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Homepage on Daijiang Li</title>
    <link>https://blog.dlilab.com/</link>
    <description>Recent content in Homepage on Daijiang Li</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 31 Jan 2017 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.dlilab.com/" rel="self" type="application/rss+xml" />
    
    <item>
      <title>macOS update issue</title>
      <link>https://blog.dlilab.com/en/2025/07/31/macos_update/</link>
      <pubDate>Thu, 31 Jul 2025 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2025/07/31/macos_update/</guid>
      <description>
        

&lt;p&gt;After updating macOS to Sequoia Version 15.6 (24G84), I noticed that I cannot interact with the Finder from any other Applications. For example, I cannot export files from &lt;code&gt;Photos.app&lt;/code&gt;, I cannot upload files to &lt;code&gt;Google Chrome&lt;/code&gt; or &lt;code&gt;Safari&lt;/code&gt;, I cannot exclude folders from &lt;code&gt;TimeMachine&lt;/code&gt; when backup the computer. Whenever I click on the uploading or exporting or excluding box, there is a spin of the colorful ball, and after about 10 seconds, nothing happended.&lt;/p&gt;

&lt;p&gt;I got really frustrated, and was almost ready to downgrade the whole system back to an earlier version. After doing some search (AI answer did not help), I found this one solved my issue: &lt;a href=&#34;https://apple.stackexchange.com/a/474043/&#34; target=&#34;_blank&#34;&gt;https://apple.stackexchange.com/a/474043/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Essentially, I just need to remove the cache of &lt;code&gt;FileProvider&lt;/code&gt; (the name makes sense now after came across with this issue).&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;rm -r ~/Library/Application\ Support/FileProvider/*
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then restart the Applications, and it now can interact with the Finder file system!!! Saved me a day.&lt;/p&gt;

&lt;p&gt;And, btw, we have finally arrived at Madison, WI yesterday. I may can write a short blog post about the whole process later.&lt;/p&gt;

&lt;h2 id=&#34;calendar-sync&#34;&gt;Calendar Sync&lt;/h2&gt;

&lt;p&gt;It has bothered me for a while that the Calendar on my mac does not sync all the things on my work outlook calendar. I tried to make sure the outlook exchange account is logged in, still did not sync. Then, I learned to restart the &lt;code&gt;exchangesyncd&lt;/code&gt; process: open Activity Monitor, find the &lt;code&gt;exchangesyncd&lt;/code&gt; process, and force quit it. It will restart automatically, which resolved the sync issues!&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2025/07/31/macos_update/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>RStudio Server</title>
      <link>https://blog.dlilab.com/en/2024/08/14/rstudio-server/</link>
      <pubDate>Wed, 14 Aug 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2024/08/14/rstudio-server/</guid>
      <description>
        &lt;p&gt;After moving the workstation from LSU to University of Arizona, I could not get access to it after plugging it to the Ethernet. So, I asked the university ITS group to help. They opened the &lt;code&gt;8787&lt;/code&gt; portal on the university network, I then can access it via &lt;code&gt;https:://ip_address:8787&lt;/code&gt; with the university VPN. Everything worked well.&lt;/p&gt;

&lt;p&gt;Until we need to move it to a nearby room as it was initially put in another professor&amp;rsquo;s office. After moving to my office, I could not get access to it anymore. We then tried to put it back to that professor&amp;rsquo;s office, and still no luck!! This is quite puzzling as we did not change anything.&lt;/p&gt;

&lt;p&gt;UITS team came and made sure that it is all good on the university network side. So it must by the problem from the workstation. Sure it was. And the following command solved it! Sort of weird as we did not change anything!&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo firewall-cmd --permanent --add-port 8787/tcp
&lt;/code&gt;&lt;/pre&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2024/08/14/rstudio-server/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Brief notes of the iDigBio workshop</title>
      <link>https://blog.dlilab.com/en/2024/06/10/idigbio-workshop/</link>
      <pubDate>Mon, 10 Jun 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2024/06/10/idigbio-workshop/</guid>
      <description>
        

&lt;h2 id=&#34;advances-in-digital-media-workshop-series-yale-https-www-idigbio-org-wiki-index-php-advances-in-digital-media-workshop-series-yale&#34;&gt;&lt;a href=&#34;https://www.idigbio.org/wiki/index.php/Advances_in_Digital_Media_Workshop_Series:_Yale&#34; target=&#34;_blank&#34;&gt;Advances in Digital Media Workshop Series: Yale&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;Here are just some of my very brief notes (pretty much just keywords).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;LightningBug:

&lt;ul&gt;
&lt;li&gt;digitizing specimen labels using ML&lt;/li&gt;
&lt;li&gt;Meta&amp;rsquo;s Segmentation tool Segment Anything Model (SAM) is good and faster than r-cnn&lt;/li&gt;
&lt;li&gt;200k images, 6.9k specimens&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Heritage Science

&lt;ul&gt;
&lt;li&gt;NSF Mid-scale research program&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.morphosource.org/&#34; target=&#34;_blank&#34;&gt;MorphoSource&lt;/a&gt;: 3D, 2D, AV media data repository

&lt;ul&gt;
&lt;li&gt;Maybe a good place to look for exemplary sites for PhenoBase&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Audiovisual Core&lt;/li&gt;
&lt;li&gt;Expanding LeafMachine2: new training data, models, and methods for processing herbarium specimens; Will Weaver, PhD Candidate, University of Michigan&lt;/li&gt;
&lt;li&gt;Detectron by facebook to detect objects from images&lt;/li&gt;
&lt;li&gt;Imageomics ?&lt;br /&gt;&lt;/li&gt;
&lt;li&gt;Phylogeny-guided neural network (phylo-NNs) Elhamod et al, KDD 2023&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://iiif.io/&#34; target=&#34;_blank&#34;&gt;IIIF&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Phenotypic diversity

&lt;ul&gt;
&lt;li&gt;Phenological diversity&lt;/li&gt;
&lt;li&gt;Phenome space&lt;/li&gt;
&lt;li&gt;Segament Anything Model (SAM) + Grounding DINO&lt;/li&gt;
&lt;li&gt;t-SNE visualization for clustering data&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;More training data is not always better for ML models

&lt;ul&gt;
&lt;li&gt;If additional related but not present images are added&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Multimodel AI models

&lt;ul&gt;
&lt;li&gt;CLIP&lt;/li&gt;
&lt;li&gt;LMMs as effective rerankers&lt;/li&gt;
&lt;li&gt;INQUIRE: text-to-image search of iNaturalist images&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2D to 3D reconstruction

&lt;ul&gt;
&lt;li&gt;Surface-to-volume ratio seems to be well preserved in shark, snakes
&lt;br /&gt;
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2024/06/10/idigbio-workshop/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Running R on HiperGator</title>
      <link>https://blog.dlilab.com/en/2024/05/06/hipergator-r/</link>
      <pubDate>Mon, 06 May 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2024/05/06/hipergator-r/</guid>
      <description>
        

&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;

&lt;p&gt;How can I run R on HiperGator within my terminal? The interactive RStudio server works okay, but whenever you request a longer running time or more memory, you will wait much longer in queue. I would prefer to just run &lt;code&gt;R CMD BATCH&lt;/code&gt; within my terminal.&lt;/p&gt;

&lt;h2 id=&#34;solution&#34;&gt;Solution&lt;/h2&gt;

&lt;p&gt;Update: just use &lt;code&gt;module load R&lt;/code&gt;. No longer need to next steps.&lt;/p&gt;

&lt;p&gt;It is probably documented somewhere by HiperGator. I just could not find it easily.&lt;/p&gt;

&lt;p&gt;Here are the steps I followed.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to HiperGator terminal, install &lt;a href=&#34;https://github.com/conda-forge/miniforge&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;miniforge&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;mamba&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Exit terminal and login back again&lt;/li&gt;
&lt;li&gt;In terminal, run &lt;code&gt;mamba create -n nameofmyenvi r-essentials r-base&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;add additional packages you want to install, e..g, &lt;code&gt;r-torch&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;or install later with &lt;code&gt;mamba install cuda-toolkit=11.8 pytorch&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mamba activate nameofmyenvi&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;In terminal, type &lt;code&gt;R&lt;/code&gt; and now you should be able to open R

&lt;ul&gt;
&lt;li&gt;If running long time jobs, use &lt;code&gt;tmux&lt;/code&gt; with &lt;code&gt;module load tmux&lt;/code&gt;, then &lt;code&gt;tmux&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ol&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2024/05/06/hipergator-r/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>回国 - 网络篇</title>
      <link>https://blog.dlilab.com/cn/2024/03/13/flower/</link>
      <pubDate>Wed, 13 Mar 2024 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/cn/2024/03/13/flower/</guid>
      <description>
        

&lt;p&gt;转眼 8 年没有回国了。2019 年的时候本来打算回国一趟，但是正好有个工作面试（没有拿到 offer），怕回国签证会被审核耽误面试，就没有回去了。想着 2020 年再回来一趟。然后大家都知道 2020 年发生了什么事。疫情三年，恍若隔世。这样算了，转眼 8 年没有回国了。上次还是 2016 年回来过。&lt;/p&gt;

&lt;p&gt;这里简单记录一下在国内不科学上网的情况下能够或者不能够用的网络服务。&lt;/p&gt;

&lt;h2 id=&#34;能用&#34;&gt;能用&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;大学邮件系统 (Outlook)&lt;/li&gt;
&lt;li&gt;GitHub 能用，但是不稳定&lt;/li&gt;
&lt;li&gt;Box&lt;/li&gt;
&lt;li&gt;Nextdoor&lt;/li&gt;
&lt;li&gt;Apple map (用的是高德地图)&lt;/li&gt;
&lt;li&gt;BlueSky&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;不能用&#34;&gt;不能用&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;常见已知不能用的：Google 全家桶，包括 Google Doc，Google Scholar(!!), Twitter, Facebook, Youtube, etc.&lt;/li&gt;
&lt;li&gt;大学 VPN (LSU VPN) 连不上&lt;/li&gt;
&lt;li&gt;Discord, Slack (!!)&lt;/li&gt;
&lt;li&gt;Feedly (!!)&lt;/li&gt;
&lt;li&gt;Apple News (iOS app)&lt;/li&gt;
&lt;li&gt;The Weather Channel (iOS app)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;现在看看能不能学习一下科学上网。&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://com.ss.sssuusss.com/auth/register?code=tvie&#34; target=&#34;_blank&#34;&gt;https://com.ss.sssuusss.com/auth/register?code=tvie&lt;/a&gt;&lt;/p&gt;

        
      </description>
    </item>
    
    <item>
      <title>Problems with installing R package `arrow`</title>
      <link>https://blog.dlilab.com/en/2023/08/14/arrow-r/</link>
      <pubDate>Mon, 14 Aug 2023 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2023/08/14/arrow-r/</guid>
      <description>
        

&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;

&lt;p&gt;On the Linux server, I have recently upgraded R version to 4.3.1. Today, when I try to use the &lt;code&gt;arrow&lt;/code&gt; R package to read some large data files, I got the following error:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;Error: package or namespace load failed for ‘arrow’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object &#39;/home/dli/R/arrow/libs/arrow.so&#39;:
  libcrypto.so.1.1: cannot open shared object file: No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It seems that the file &lt;code&gt;libcrypto.so.1.1&lt;/code&gt; is missing (not sure why as I did not change the OS in the past couple of months).&lt;/p&gt;

&lt;h2 id=&#34;solution&#34;&gt;Solution&lt;/h2&gt;

&lt;p&gt;It seems that &lt;code&gt;libcrypto.so.1.1&lt;/code&gt; is included in the &lt;code&gt;libssl1.1&lt;/code&gt; program. I browsed the options at &lt;a href=&#34;http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/?C=M;O=D&#34; target=&#34;_blank&#34;&gt;http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/?C=M;O=D&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Use the above command to install the missing program. Problem solved. Sign&amp;hellip; :smiling&lt;em&gt;face&lt;/em&gt;with&lt;em&gt;tear: :smiling&lt;/em&gt;face&lt;em&gt;with&lt;/em&gt;tear:&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2023/08/14/arrow-r/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Git used wrong path of `gh`</title>
      <link>https://blog.dlilab.com/en/2023/06/26/git-gh/</link>
      <pubDate>Mon, 26 Jun 2023 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2023/06/26/git-gh/</guid>
      <description>
        

&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;

&lt;p&gt;On the Linux server, I have installed &lt;code&gt;homebrew&lt;/code&gt; to manage software and installed &lt;code&gt;gh&lt;/code&gt; to manage GitHub authorizations. It used to work well. Today, I am trying to use &lt;code&gt;git push&lt;/code&gt; to push commits to GitHub there after a while without using it. However, it complained that it cannot find the &lt;code&gt;gh&lt;/code&gt; bin.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;/home/linuxbrew/.linuxbrew/Cellar/gh/2.14.3/bin/gh auth git-credential get: 1: /home/linuxbrew/.linuxbrew/Cellar/gh/2.14.3/bin/gh: not found
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It seems that this is the version issue for &lt;code&gt;gh&lt;/code&gt; as brew has updated it to a later version. Yet, somehow the &lt;code&gt;git push&lt;/code&gt; is still using the old path.&lt;/p&gt;

&lt;h2 id=&#34;solution&#34;&gt;Solution&lt;/h2&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;gh auth setup-git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Use the above command to set or update &lt;code&gt;git&lt;/code&gt; to use GitHub CLI &lt;code&gt;gh&lt;/code&gt; as the credential helper for all authenticated hosts. Problem solved.&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2023/06/26/git-gh/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Tensorflow and R set up on server</title>
      <link>https://blog.dlilab.com/en/2022/11/04/tensorflow-r/</link>
      <pubDate>Fri, 04 Nov 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2022/11/04/tensorflow-r/</guid>
      <description>
        &lt;p&gt;I am trying to set up Tensorflow and Keras on a Ubuntu server. And I want to interact with them through R. I came across some errors such as&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Error: Valid installation of TensorFlow not found.

ModuleNotFounderror: No Module named &#39;_ctypes&#39;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After gooling, here is the code I used to solve this issue, following the instructuin &lt;a href=&#34;https://github.com/pyenv/pyenv/wiki#suggested-build-environment&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo apt update

sudo apt install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
libffi-dev liblzma-dev

# you may need to use apt-get
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, in R:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;library(reticulate)
path_to_python &amp;lt;- install_python(force = T)
virtualenv_create(&amp;quot;r-reticulate&amp;quot;, python = path_to_python)
install.packages(&amp;quot;keras&amp;quot;)
install_keras(envname = &amp;quot;r-reticulate&amp;quot;)
tensorflow::tf_config()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It seems to work now.&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2022/11/04/tensorflow-r/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Library not found for `-lgfortran`</title>
      <link>https://blog.dlilab.com/en/2022/11/01/lgfortran/</link>
      <pubDate>Tue, 01 Nov 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2022/11/01/lgfortran/</guid>
      <description>
        &lt;p&gt;After updating to macOS 13.0 (Ventura), somehow I got the following error when compile an R package with C++ code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ld: warning: directory not found for option &#39;-L/usr/local/gfortran/lib&#39;    
ld: library not found for -lgfortran macos ventura
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Probably it is because the homebrew installed &lt;code&gt;gfortran&lt;/code&gt; cannot be found by the system after the upgrading. I was in rush and did not have the time to figure out this. Instead, just went to &lt;a href=&#34;https://github.com/fxcoudert/gfortran-for-macOS/releases&#34; target=&#34;_blank&#34;&gt;this webpage&lt;/a&gt; and downloaded the latest gfortran package and installed it manually. After installation, I was able to compile the package again. Problem solved for now.&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2022/11/01/lgfortran/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Host R packages on r-universe</title>
      <link>https://blog.dlilab.com/en/2022/09/30/r-universe/</link>
      <pubDate>Fri, 30 Sep 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2022/09/30/r-universe/</guid>
      <description>
        

&lt;h1 id=&#34;the-problem&#34;&gt;The problem&lt;/h1&gt;

&lt;p&gt;Here is the problem: I am developing an R package &lt;a href=&#34;https://github.com/daijiang/rtrees&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;rtrees&lt;/code&gt;&lt;/a&gt;, which depends on a data package &lt;a href=&#34;https://github.com/daijiang/megatrees&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;megatrees&lt;/code&gt;&lt;/a&gt; with size around 100 Mb. It is not possible to submit the data package to CRAN given its large size. In addition, CRAN does not allow packages with &lt;code&gt;Remotes&lt;/code&gt; field (i.e., your package cannot depends on a package on GitHub). Therefore, I cannot submit &lt;code&gt;rtrees&lt;/code&gt; to CRAN.&lt;/p&gt;

&lt;h1 id=&#34;solution&#34;&gt;Solution&lt;/h1&gt;

&lt;p&gt;After searching around, I came across the &lt;a href=&#34;https://r-universe.dev/search/&#34; target=&#34;_blank&#34;&gt;R-universe program&lt;/a&gt; by rOpenSci. R-unierse allow us to build binary files for R packages and host it online; basically, we can have our own personal CRAN-like repo to host binaries for R packages without much trouble by following &lt;a href=&#34;https://ropensci.org/blog/2021/06/22/setup-runiverse/&#34; target=&#34;_blank&#34;&gt;its instruction&lt;/a&gt;. Now, my data package is on &lt;a href=&#34;https://daijiang.r-universe.dev/ui#packages&#34; target=&#34;_blank&#34;&gt;my r-universe&lt;/a&gt;. And in the &lt;code&gt;DESCRIPTION&lt;/code&gt; file of &lt;code&gt;rtrees&lt;/code&gt;, I can replace &lt;code&gt;Remotes&lt;/code&gt; with the following line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Additional_repositories: 
    https://daijiang.r-universe.dev
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I think this should allow me to submit &lt;code&gt;rtrees&lt;/code&gt; to CRAN in the future. Since R-universe build binaries for the R packages we put there (Mac and Windows), it is now pretty fast to install large packages.&lt;/p&gt;

&lt;h1 id=&#34;shinny-app&#34;&gt;Shinny App&lt;/h1&gt;

&lt;p&gt;When I deploy the &lt;a href=&#34;https://djli.shinyapps.io/rtrees_shiny/&#34; target=&#34;_blank&#34;&gt;Shiny app of &lt;code&gt;rtrees&lt;/code&gt;&lt;/a&gt;, shinyapps.io does not recognize r-universe and returned an error. To deploy it, I need to reinstall the package from GitHub using &lt;code&gt;remotes::install_github()&lt;/code&gt;. This is because when deploying the shinny app, R will use the same way that you have installed the packages locally. If I installed the package from r-universe, R will try to do the same thing when deploying the shinny app; if I installed the package from GitHub, R will also install it from GitHub when deploying the shinny app.&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2022/09/30/r-universe/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Weird R issue caused by messed up BLAS/LAPACK libraries</title>
      <link>https://blog.dlilab.com/en/2022/08/22/blas-lapack/</link>
      <pubDate>Mon, 22 Aug 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2022/08/22/blas-lapack/</guid>
      <description>
        &lt;p&gt;Today, the server had some really bizarre behavior: when run a simple linear regression using R multiple times, the results are totally different! How is this possible? There is no randomness in the linear regression, it is deterministic!!&lt;/p&gt;

&lt;p&gt;I had no idea what is going on. Therefore, I posted in on &lt;a href=&#34;https://stackoverflow.com/questions/73451244/why-running-the-same-r-lm-code-gives-different-results/73452500#73452500&#34; target=&#34;_blank&#34;&gt;Stack Overflow&lt;/a&gt;. With some help from others, I though the issue may be from the &lt;a href=&#34;https://csantill.github.io/RPerformanceWBLAS/&#34; target=&#34;_blank&#34;&gt;BLAS/LAPACK libraries&lt;/a&gt; on the server.&lt;/p&gt;

&lt;p&gt;Currently, I have the Intel MLK version on the computer.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libmkl_rt.so
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So, I changed it to the &lt;code&gt;OpenBLAS&lt;/code&gt; library as it &lt;a href=&#34;https://csantill.github.io/RPerformanceWBLAS/&#34; target=&#34;_blank&#34;&gt;has similar speed as MLK&lt;/a&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo update-alternatives --config libblas.so.3-x86_64-linux-gnu
sudo update-alternatives --config liblapack.so.3-x86_64-linux-gnu
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After restarting R, the problem is solved!! What a weird one.&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2022/08/22/blas-lapack/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Useful Vim commands</title>
      <link>https://blog.dlilab.com/en/2022/03/09/vim-command/</link>
      <pubDate>Wed, 09 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2022/03/09/vim-command/</guid>
      <description>
        

&lt;h1 id=&#34;vim-commands&#34;&gt;Vim commands&lt;/h1&gt;

&lt;h2 id=&#34;normal-mode-to-insert-mode&#34;&gt;Normal mode to insert mode&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;i&lt;/code&gt;: insert text just before the cursor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;I&lt;/code&gt;: insert text at the start of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;a&lt;/code&gt;: append text just after the cursor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;A&lt;/code&gt;: append text at the end of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;o&lt;/code&gt;: open a new line below.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;O&lt;/code&gt;: open a new line above.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;s&lt;/code&gt;: substitute the current character.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;S&lt;/code&gt;: substitute the current line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;r&lt;/code&gt;: replace the current character.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;R&lt;/code&gt;: replace continuous characters.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;move-cursor-around&#34;&gt;Move cursor around&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0&lt;/code&gt;: move to the start of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;^&lt;/code&gt;: move to the first non-blank character of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;$&lt;/code&gt;: move to the end of the line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-b&lt;/code&gt;: move back one screen.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-f&lt;/code&gt;: move forward one screen.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;H&lt;/code&gt;: jump as high as possible, i.e. the first line of the window.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;M&lt;/code&gt;: jump to the middle of the window.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;L&lt;/code&gt;: jump to the lowest line of the window.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;G&lt;/code&gt;: jump to the end of the file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;1G&lt;/code&gt; or &lt;code&gt;gg&lt;/code&gt;: jump to the start of the file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;30G&lt;/code&gt;: jump to line 30.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;w&lt;/code&gt;: move to the start of next word. 2w move two words.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;e&lt;/code&gt;: move to the end of next word.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;b&lt;/code&gt;: move backward one word.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;(&lt;/code&gt;: move to previous sentence.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;)&lt;/code&gt;: move to next sentence.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;{&lt;/code&gt;: move to previous paragraph&lt;/li&gt;
&lt;li&gt;&lt;code&gt;J&lt;/code&gt;: move to next paragraph.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-o&lt;/code&gt;: jump backward to previous location.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-i&lt;/code&gt;: jump forward to next location.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ma&lt;/code&gt;: mark current position, then move to other places and use &lt;code&gt;&#39;a&lt;/code&gt; (single quote then a) to come back to the start of the marked line, or you can use &amp;lsquo;&lt;code&gt;a&#39; (backtick and a) to jump to exact place. You can also use&lt;/code&gt;mb&lt;code&gt;and &#39;&lt;/code&gt;b&amp;rsquo;, i.e. any letters a-z A-Z.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;%&lt;/code&gt;: jump to corresponding item, e.g. from left brace to the right brace&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;visual-mode&#34;&gt;Visual mode&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;v&lt;/code&gt; then &lt;code&gt;ap&lt;/code&gt;: (a paragraph) choose a paragraph where the curson is on.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;y&lt;/code&gt; then &lt;code&gt;aw&lt;/code&gt;: choose the word where the cursor is on.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;u&lt;/code&gt; then &lt;code&gt;a&amp;quot;&lt;/code&gt;: choose the whole quoted word/sentence where the cursor is within.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;u&lt;/code&gt; then &lt;code&gt;ab&lt;/code&gt;: choose a block of text, i.e. within parathese, brakets, etc.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~&lt;/code&gt;: switch cases of letters, i.e. upper to lower, lower to upper.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;V&lt;/code&gt;: visual mode with lines.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;edit-text&#34;&gt;Edit text&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;d&lt;/code&gt;: delete and put text into clipboard.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dd&lt;/code&gt;: delete the current line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dl&lt;/code&gt; or &lt;code&gt;x&lt;/code&gt;: delete the current letter where the cursor is.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dw&lt;/code&gt;: delete a word where the cursor is.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;d$&lt;/code&gt;: delete text after the cursor of the current line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;d0&lt;/code&gt;: delete text before the cursor of the current line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dh&lt;/code&gt;, &lt;code&gt;dj&lt;/code&gt;, &lt;code&gt;dk&lt;/code&gt;, &lt;code&gt;d2ap&lt;/code&gt;, &lt;code&gt;d2w&lt;/code&gt;, &lt;code&gt;d31&lt;/code&gt;, &lt;code&gt;24h&lt;/code&gt;, &lt;code&gt;d5j&lt;/code&gt;, etc. Combine number with options.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;y&lt;/code&gt;: yank or copy text&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yy&lt;/code&gt;: yank the current line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;yap&lt;/code&gt;: yank the current paragraph&lt;/li&gt;
&lt;li&gt;&lt;code&gt;p&lt;/code&gt;: paste text after cursor position.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;P&lt;/code&gt;: paste text before cursor position.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xp&lt;/code&gt;: cut then paste after cursor, so swap two characters.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dwwP&lt;/code&gt;: cut one word, move to next word, paste before that word, so swap two words&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.&lt;/code&gt;: repeat last action. If you want to repeat a series of actions, use &lt;code&gt;qa&lt;/code&gt; to start recording a macro, then do changes, then press &lt;code&gt;q&lt;/code&gt; to stop recording, in another line, use &lt;code&gt;Ca&lt;/code&gt; to do same changes on that line. Or &lt;code&gt;qb&lt;/code&gt;, &lt;code&gt;qc&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;u&lt;/code&gt;: undo the last change.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-r&lt;/code&gt;: redo the undo.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:earlier 5m&lt;/code&gt;: back to five minutes ago, i.e. time machine..&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:later 45s&lt;/code&gt;: forward in time&amp;hellip;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:undo 5&lt;/code&gt;: undo the last five changes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:noh&lt;/code&gt;: no highlight after search.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:undolist&lt;/code&gt;: view the undo tree.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;search&#34;&gt;Search&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/word&lt;/code&gt;: to move to the first occurrence of word.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;n&lt;/code&gt;: go to next occurrence.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;N&lt;/code&gt;: go to previous occurrence.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/\&amp;lt;word\&amp;gt;&lt;/code&gt;: search word exactly.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/\d\*&lt;/code&gt;: search 0 or more digit (s).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;search-and-replace&#34;&gt;Search and replace&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:S/search/replace/g&lt;/code&gt;: search and replace in current line.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:%S/search/replace/g&lt;/code&gt;: search and replace in all lines.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:%S/search/replace/gc&lt;/code&gt;: ask for confirmation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;multiple-files&#34;&gt;Multiple files&lt;/h2&gt;

&lt;h3 id=&#34;multiple-sections&#34;&gt;Multiple sections&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:set foldmethod=indent&lt;/code&gt;, then at indent line, &lt;code&gt;ze&lt;/code&gt; to close the fold (compress), &lt;code&gt;zo&lt;/code&gt; to open the fold, or &lt;code&gt;za&lt;/code&gt; to switch between close and open, alternate.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;multiple-files-1&#34;&gt;Multiple files&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:edit file1&lt;/code&gt;, &lt;code&gt;:e file2&lt;/code&gt;, then use &lt;code&gt;:b 1&lt;/code&gt; to go to file l, &lt;code&gt;:b 2&lt;/code&gt; to file 2. &lt;em&gt;b&lt;/em&gt; means buffer. &lt;code&gt;:ls&lt;/code&gt; to show all editing files.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;multiple-windows&#34;&gt;Multiple windows&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:new&lt;/code&gt;: to open a new window.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-w h/j/k/l&lt;/code&gt; or &lt;code&gt;ctrl-w ctrl-w&lt;/code&gt;: to move among windows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:sp&lt;/code&gt;: to split current window. or use &lt;code&gt;ctrl-w s&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:vsp&lt;/code&gt;: to split vertical window, or use &lt;code&gt;ctrl-w v&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-w r&lt;/code&gt;: to rotate positions of windows.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-w K&lt;/code&gt;: move current window to topmost position.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:resize 10&lt;/code&gt; or &lt;code&gt;resize -10&lt;/code&gt;: change window size to display 10 more/less lines.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-w _&lt;/code&gt;: increase current window size as much as possible.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ctrl-w =&lt;/code&gt;: make all windows same size.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;multiple-tabs&#34;&gt;Multiple tabs&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:tabnew&lt;/code&gt;: to open a new tab&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gt&lt;/code&gt;: go to next tab.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gT&lt;/code&gt;: go to previous tab.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;:tabmove&lt;/code&gt;: to reorder tabs, e.g. &lt;code&gt;:tabmove O&lt;/code&gt; moves the current tab to the first position.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;others&#34;&gt;Others&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;:!&lt;/code&gt;: to run shell commands within vim.&lt;/li&gt;
&lt;/ul&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2022/03/09/vim-command/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Kate</title>
      <link>https://blog.dlilab.com/zoey/2018/02/11/kate/</link>
      <pubDate>Sun, 11 Feb 2018 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/zoey/2018/02/11/kate/</guid>
      <description>
        &lt;p&gt;妹妹都已经半岁了，我都还没写上只言片语。真是有点过分了。&lt;/p&gt;

&lt;p&gt;妹妹出生倒是蛮快的。凌晨 3 点左右有感觉，收拾东西上医院。6 点左右检查完就在医院住下了。上午 11 点多就出来了。也没有让你妈妈受太多苦。我这中间还顺便送了姐姐去学校。&lt;/p&gt;

&lt;p&gt;总体来说，这姐妹两就是一个模子出来的（本来就是嘛）。一样的吃得少，一样的睡得少睡得浅！这本来就轻，还不肯吃东西不肯睡觉。一天下来睡的加起来最多 13 个小时，都达不到最低要求啊！20% 的体重，11% 的身高，哎。我就不吐槽了。&lt;/p&gt;

&lt;p&gt;姐姐这么大的时候早就翻身翻得很利索了。妹妹倒好，躺下趴下立马哇哇大哭。所以至今没有自己翻过身。好吧，我就等你直接走路好了。&lt;/p&gt;

&lt;p&gt;不经意间 Kate 已经坐的很好了。下面也已经张出来两颗门牙了。不到七个月就开始长牙啦，姐姐都快九个月的时候才开始哦。&lt;/p&gt;

&lt;p&gt;嗯，对了，Kate 最不喜欢的事情就是穿衣服了。每次穿衣服都会嗷嗷大哭。最喜欢的事情就是抓一本书来吃。&lt;/p&gt;

        
      </description>
    </item>
    
    <item>
      <title>桂花</title>
      <link>https://blog.dlilab.com/cn/2018/02/11/flower/</link>
      <pubDate>Sun, 11 Feb 2018 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/cn/2018/02/11/flower/</guid>
      <description>
        &lt;p&gt;今天在 kanapaha 植物园给大河过生日。刚进园子不久就看见了山茶，杜鹃，和玉兰都开花了，但是闻见的却是久违的桂花香味。这应该是来美第一次吧！往前走一会就找到了一排大约 7-8 棵不是很高的桂花树，不免有点小兴奋。&lt;/p&gt;

&lt;p&gt;初中时候应该是闻桂花最多的时候吧。那时候学校操场上面有好几颗很大的桂花树。教学楼前面也有些较小的。每到中秋时分，整个校园都是怡人的桂花香味。可惜现在这些树貌似都不在了。初中之后就较少这么密集的闻见桂花了，不过这记忆倒是没有变淡。&lt;/p&gt;

        
      </description>
    </item>
    
    <item>
      <title>Add Multiple Passport Photos on One Page using R</title>
      <link>https://blog.dlilab.com/en/2018/01/10/add-multiple-passport-photos-on-one-page-using-r/</link>
      <pubDate>Wed, 10 Jan 2018 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2018/01/10/add-multiple-passport-photos-on-one-page-using-r/</guid>
      <description>
        &lt;p&gt;In this post, I document how to put multiple photos on one page to save paper.&lt;/p&gt;

&lt;p&gt;First, after taking the photos, I edited them with &lt;a href=&#34;https://www.gimp.org&#34; target=&#34;_blank&#34;&gt;GIMP&lt;/a&gt;: adjust light, color, crop to the desired area. Then we need to &lt;a href=&#34;https://docs.gimp.org/en/gimp-image-scale.html&#34; target=&#34;_blank&#34;&gt;scale the cropped photo to the specified size&lt;/a&gt;. To do this, in the GIMP, I first selected &lt;code&gt;image/scale image&lt;/code&gt;. This will allow us to scale the photo to the size required; it also allow us specify the resolution in different units (e.g. pixel/inch, pixel/mm). If you have photos for more than one kid, then make sure that both photos have the same size and resolution. This will make later steps easier. It would also be useful to check (and scale if necessary) the &lt;a href=&#34;https://docs.gimp.org/en/gimp-image-print-size.html&#34; target=&#34;_blank&#34;&gt;print size&lt;/a&gt; too. After scaling the photo, &lt;a href=&#34;https://docs.gimp.org/en/gimp-export-dialog.html&#34; target=&#34;_blank&#34;&gt;export&lt;/a&gt; it as an external file. Since I have two kids, I got two photos (same size and resolution) in my folder after these steps.&lt;/p&gt;

&lt;p&gt;Time to use R. Specifically, the &lt;a href=&#34;https://cran.r-project.org/web/packages/magick/index.html&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;magick&lt;/code&gt;&lt;/a&gt; package did all the heavy lifting.&lt;/p&gt;

&lt;p&gt;First, read the photos into R.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;library(magick)
pic1 = image_read(&amp;quot;pic1.jpg&amp;quot;)
pic2 = image_read(&amp;quot;pic2.jpg&amp;quot;)
image_info(pic1) # size in pixel
image_info(pic2) # both should have the same size
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To put multiple photos together, we can use the &lt;code&gt;magick::image_append()&lt;/code&gt; function. This function, however, does not have an argument to specify the space between photos. Thus we need to create a blank image as a separator.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;sep = image_graph(width = 100, height = image_info(pic1)$height, 
                  bg = &amp;quot;white&amp;quot;)
plot(1, type = &amp;quot;n&amp;quot;, axes = F, xlab = &amp;quot;&amp;quot;, ylab = &amp;quot;&amp;quot;)
dev.off()
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Great, now we are ready to put them together.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;pic1s = image_append(c(pic1, sep, pic1, sep, pic1, sep, pic1))
pic22 = image_append(c(pic2, sep, pic2, sep, pic2, sep, pic2))
# stack both
both = image_append(c(pic1s, pic2s), stack = TRUE)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here I put four photos for each of them. You can adjust the above code if you want different numbers.&lt;/p&gt;

&lt;p&gt;Finally, save the image to the disk.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;image_write(both, path = &amp;quot;both.jpg&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Check it out! We have multiple photos in one page now. One additional step (optional) is to open the new &lt;code&gt;both.jpg&lt;/code&gt; in GIMP and &lt;a href=&#34;https://docs.gimp.org/en/gimp-image-resize.html&#34; target=&#34;_blank&#34;&gt;set the cavans size&lt;/a&gt;. I set it to 6 by 4 inches and exported it out.&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;s it. Super simple but very useful.&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2018/01/10/add-multiple-passport-photos-on-one-page-using-r/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Fetching phylogenies from Phylomatic with R</title>
      <link>https://blog.dlilab.com/en/2017/08/25/r-phylomatic/</link>
      <pubDate>Fri, 25 Aug 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/08/25/r-phylomatic/</guid>
      <description>
        &lt;p&gt;It is usually a good idea to control for species evolutionary history if we want to get robust results. This is because species are not independent from each other, thus violate the independence assumption of data for most statistical models. Fortunately, with growing available genetic data and softwares, building phylogenies are getting easier and easier.&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;http://phylodiversity.net/phylomatic/&#34; target=&#34;_blank&#34;&gt;Phylomatic&lt;/a&gt; is an easy way to fetch phylogenies for species, especially plants, on line. Thanks to packages developed by &lt;a href=&#34;https://ropensci.org&#34; target=&#34;_blank&#34;&gt;rOpenSci&lt;/a&gt;, we can now use Phylomatic within R. One big advantage of this is reproducibility, which means that we can regenerate the phylogeny whenever we want without click on buttons on the website. In addition, because most ecologists are using R for downstream analyses, fetching phylogenies within R will make the workflow much natural and easy to follow.&lt;/p&gt;

&lt;p&gt;The basic procedure for fetching phylogenies with Phylomatic using R will be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Compile the species names we want to include in the phylogeny; and clean if necessary (&lt;code&gt;taxize&lt;/code&gt; package, &lt;code&gt;rotl::tnrs_match_names()&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Clean and prepare species names in the format to be used with Phylomatic (&lt;code&gt;brranching::phylomatic_names()&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Query Phylomatic and return the phylogeny (&lt;code&gt;brranching::phylomatic()&lt;/code&gt;; if you have hundreds species, it is better to use Phylomatic locally with &lt;code&gt;brranching::phylomatic_local()&lt;/code&gt;)&lt;sup class=&#34;footnote-ref&#34; id=&#34;fnref:Another-option-t&#34;&gt;&lt;a rel=&#34;footnote&#34; href=&#34;#fn:Another-option-t&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It is possible to merge step 2 and 3, but I prefer to separate them.&lt;/p&gt;

&lt;p&gt;I assume that you already have a list of species, named as &lt;code&gt;sp_list&lt;/code&gt;. Then we can use the &lt;code&gt;phylomatic()&lt;/code&gt; function from the &lt;code&gt;brranching&lt;/code&gt; package. If you do not have it installed, install it first with &lt;code&gt;install.packages(&amp;quot;brranching&amp;quot;)&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;sp_list = c()
tree = brranching::phylomatic(sp_list)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you have few species, this will likely give you a phylogeny with all species. However, in practice, it is quite possible that you will get a warning like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;NOTE: 3 taxa not matched: NA/genus/species, ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In this case, we may try to prepare species names first with &lt;code&gt;brranching::phylomatic_names()&lt;/code&gt;. The default database will be &lt;code&gt;ncbi&lt;/code&gt;, but if you have hundreds of species, this can be slow. Instead, I would suggest to use &lt;code&gt;ape&lt;/code&gt; first because it is much faster (this is the default within &lt;code&gt;brranching::phylomatic()&lt;/code&gt;). Then filter out those species have &lt;code&gt;NA&lt;/code&gt; as family and try &lt;code&gt;ncbi&lt;/code&gt; or &lt;code&gt;itis&lt;/code&gt; (these are the three database supported). Sometimes, your species names are not clean, e.g. with synonyms, then the R package &lt;code&gt;taxize&lt;/code&gt; will be really handy. In addition, I find &lt;code&gt;rotl::tnrs_match_names()&lt;/code&gt; is also good to check and solve names. This function will compare with &lt;a href=&#34;https://tree.opentreeoflife.org/opentree/argus/opentree9.1@ott93302&#34; target=&#34;_blank&#34;&gt;Open Tree of Life&lt;/a&gt; to check species names.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;sp_list_phylocom = brranching::phylomatic_names(sp_list, 
                                                format = &amp;quot;isubmit&amp;quot;, 
                                                db = &amp;quot;ncbi&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now, let&amp;rsquo;s try to fetch the phylogeny again, with the updated species list.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;tree = brranching::phylomatic(sp_list_phylocom)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As mentioned eariler, it is possible to merge these two steps into one with &lt;code&gt;tree = brranching::phylomatic(sp_list_phylocom, db = &amp;quot;ncbi&amp;quot;)&lt;/code&gt; but I prefer to solve species names first.&lt;/p&gt;

&lt;p&gt;The default backbone phylogeny is the APG III &lt;code&gt;R20120829&lt;/code&gt;. We can use the Zanne et al. 2014 phylogeny.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;tree = brranching::phylomatic(sp_list_phylocom, 
                              storedtree = &amp;quot;zanne2014&amp;quot;)
plot(tree)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Finally, I have one reproducible example that shows how to use the &lt;code&gt;brranching&lt;/code&gt; package to get phylogeny for plants at &lt;a href=&#34;https://github.com/daijiang/New_Phytologist_Appendix/blob/master/1-data.R&#34; target=&#34;_blank&#34;&gt;Github&lt;/a&gt;. Feel free to check it out (and the associated &lt;a href=&#34;http://onlinelibrary.wiley.com/doi/10.1111/nph.14397/abstract&#34; target=&#34;_blank&#34;&gt;paper&lt;/a&gt; if you are interested in)!&lt;/p&gt;
&lt;div class=&#34;footnotes&#34;&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li id=&#34;fn:Another-option-t&#34;&gt;Another option to use Phylomatic locally is to download Phylocom, which can also be used within R using package &lt;a href=&#34;https://github.com/ropensci/phylocomr&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;phylocomr&lt;/code&gt;&lt;/a&gt; &lt;a class=&#34;footnote-return&#34; href=&#34;#fnref:Another-option-t&#34;&gt;↩&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/08/25/r-phylomatic/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>List of functions from tidyverse that I do not use often</title>
      <link>https://blog.dlilab.com/en/2017/08/05/func-tidyverse/</link>
      <pubDate>Sat, 05 Aug 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/08/05/func-tidyverse/</guid>
      <description>
        &lt;p&gt;I do not use these functions often, but they can be really useful for some tasks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ggplot2&lt;/code&gt; package:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;coord_cartesian(xlim = , ylim = )&lt;/code&gt; to &lt;em&gt;zoom in&lt;/em&gt; a part of a figure, which is different from &lt;code&gt;xlim()&lt;/code&gt; or &lt;code&gt;scale_x_continuous(limits = )&lt;/code&gt;. The later will simply toss data points.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cut_width()&lt;/code&gt;, &lt;code&gt;cut_interval()&lt;/code&gt;, &lt;code&gt;cut_number()&lt;/code&gt; to convert a continous variable to groups.&lt;/li&gt;
&lt;li&gt;ggplot by default will drop categories without any value, to avoid this, use &lt;code&gt;... + geom_bar() + scale_x_discrete(drop = FALSE)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;reorder factor according to an numerical variable: &lt;code&gt;ggplot(data, aes(num_var, forcats::fct_reorder(factor_var, num_var))) + geom_point()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;remove legend: &lt;code&gt;... + guides(fill = FALSE)&lt;/code&gt; or &lt;code&gt;... + guides(color = FALSE)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;change legend rows: &lt;code&gt;... + guides(fill = guide_legend(nrow = 1))&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;change legend title: &lt;code&gt;... + labs(fill = &amp;quot;title&amp;quot;)&lt;/code&gt; or &lt;code&gt;... + labs(color = &amp;quot;title&amp;quot;)&lt;/code&gt; or &lt;code&gt;... + scale_fill_xxx(name = &amp;quot;title&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;change axes tick labels: e.g. &lt;code&gt;... + scale_x_log10(labels = scales::dollar, labels = scales::wrap_format(10), breaks = ...)&lt;/code&gt;. Package &lt;code&gt;scales&lt;/code&gt; can be useful.&lt;/li&gt;
&lt;li&gt;draw maps: &lt;code&gt;... + geom_polygon(aes(group = group)) + coord_map(projection = &amp;quot;albers&amp;quot;, lat0 = 39, lat1 = 45)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;when write a function for plotting, &lt;code&gt;aes_string()&lt;/code&gt; can be useful.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scale_x_continuous(expand = c(.1, .1))&lt;/code&gt; to expand the plot to avoid cutoff of labels.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scale_x_discrete(limits = rev(level(grp)))&lt;/code&gt; to reverse the order of a factor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;p + xlab(NULL)&lt;/code&gt; to remove x labels and its space.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tidyr&lt;/code&gt; package:

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;complete()&lt;/code&gt; complete a data frame with missing combinations of data. Turns implicit missing values into explicit missing values.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fill()&lt;/code&gt; Fills missing values in using the previous entry. Useful if repeated values are omitted. Last observation carried forward.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;convert = TRUE&lt;/code&gt; within &lt;code&gt;gather()&lt;/code&gt; and &lt;code&gt;spread()&lt;/code&gt; to convert the generated column into correct types.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;extract()&lt;/code&gt; with regular expressions to extract part of a column.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dplyr&lt;/code&gt; package

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;transmute()&lt;/code&gt; will only keep generated variables.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;count()&lt;/code&gt; count the number of observations.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;left_join(x, y, by = c(&amp;quot;a&amp;quot; = &amp;quot;b&amp;quot;))&lt;/code&gt; when key variable has different names in x and y.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bind_rows(list)&lt;/code&gt; = &lt;code&gt;plyr::ldply(list)&lt;/code&gt;: stack a list into a data frame (not always work, e.g. &lt;code&gt;bind_rows(list(1:2, 3:4))&lt;/code&gt; does not work but &lt;code&gt;ldply()&lt;/code&gt; works)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;stringr&lt;/code&gt; package

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;str_subset(words, &amp;quot;x$&amp;quot;)&lt;/code&gt; = &lt;code&gt;words[str_detect(words, &amp;quot;x$&amp;quot;)]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;str_count()&lt;/code&gt; will count how many matches resulted from &lt;code&gt;str_detect()&lt;/code&gt;. &lt;code&gt;str_count(&amp;quot;abababa&amp;quot;, &amp;quot;aba&amp;quot;)&lt;/code&gt; will return 2.&lt;/li&gt;
&lt;li&gt;When you use a pattern that’s a string, it’s automatically wrapped into a call to &lt;code&gt;regex()&lt;/code&gt;. See more options for &lt;code&gt;regex()&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;forcats&lt;/code&gt; package

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fct_reorder()&lt;/code&gt;, &lt;code&gt;fct_reorder2()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;fct_infreq()&lt;/code&gt;, &lt;code&gt;fct_rev()&lt;/code&gt;, &lt;code&gt;fct_recode()&lt;/code&gt;, &lt;code&gt;fct_collapse()&lt;/code&gt;, &lt;code&gt;fct_lump()&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;purrr&lt;/code&gt; package

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;map(imput, fun)&lt;/code&gt;, similar as &lt;code&gt;lapply()&lt;/code&gt;; when input is a data frame, do something specified by &lt;code&gt;fun&lt;/code&gt; to each column and return as a list. If want to return vector, use &lt;code&gt;map_dbl()&lt;/code&gt;, &lt;code&gt;map_lgl()&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;when input is a list, same as &lt;code&gt;plyr::l_ply()&lt;/code&gt;; e.g. we can use &lt;code&gt;split(mtcars, mtcars$cyl)&lt;/code&gt; to get a list from a data frame.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;split(mtcars, mtcars$cyl) %&amp;gt;% map(~lm(mpg ~ wt, data = .))&lt;/code&gt; do a lm to each element of the list; &lt;code&gt;~&lt;/code&gt; is a shortcut for anonymous function, e.g. &lt;code&gt;split(mtcars, mtcars$cyl) %&amp;gt;% map( function(df) lm(mpg ~ wt, data = df))&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;a list of models from the above point named as &lt;code&gt;models&lt;/code&gt;, then &lt;code&gt;models %&amp;gt;% map(summary) %&amp;gt;% map_dbl(~.$r.squared)&lt;/code&gt; will extract &lt;code&gt;$R^2$&lt;/code&gt; of each model. We can do this by strings too: &lt;code&gt;models %&amp;gt;% map(summary) %&amp;gt;% map_dbl(&amp;quot;r.squared&amp;quot;)&lt;/code&gt;; can even use position sometimes, e.g. &lt;code&gt;map_dbl(list(list(1, 2, 3), list(4, 5, 6), list(7, 8, 9)), 2)&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/08/05/func-tidyverse/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>尼康手动镜头</title>
      <link>https://blog.dlilab.com/cn/2017/07/02/nikon-mannual-focus-lens/</link>
      <pubDate>Sun, 02 Jul 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/cn/2017/07/02/nikon-mannual-focus-lens/</guid>
      <description>
        &lt;p&gt;尼康的老镜头大部分生产于上世纪 7，80 年代。但是做工精细，经久迷香，韵味十足。而且尼康的相机是可以兼容这些老的手动头。佳能就不行，因为佳能为自动头重新设计了相机。所以这点上我更喜欢尼康。不过不是每一台尼康的机身都支持这些老镜头的测光。只有稍微好一点的机身，比如 Nikon D7000 或者以上才可以。因为这些是手动对焦镜头，自然所有的尼康单反都不支持自动对焦。&lt;/p&gt;

&lt;p&gt;目前我只有两个手动头： 28/f2.8 AIS 和 135/f3.5 AI。但是两个的成像质量都秒杀一般的自动对焦镜头。缺陷就是对焦需要有耐心，会比较费快门。因为往往同一个场景会拍好几张以确保对焦准确性。还有就是拍小孩子或者其他需要快速对焦的情况下不太适合。不然的话，性价比近乎完美。有机会再考虑一下 55 或者 85 以及 105 焦段。&lt;/p&gt;

&lt;p&gt;表1： 网上&lt;sup class=&#34;footnote-ref&#34; id=&#34;fnref:http-blog-sina-c&#34;&gt;&lt;a rel=&#34;footnote&#34; href=&#34;#fn:http-blog-sina-c&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;关于尼康的手动对焦老镜头的汇总。更详细的参数可以参考&lt;a href=&#34;http://www.photosynthesis.co.nz/nikon/serialno.html&#34; target=&#34;_blank&#34;&gt;这里&lt;/a&gt;。&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&#34;left&#34;&gt;焦距/光圈&lt;/th&gt;
&lt;th align=&#34;left&#34;&gt;接口&lt;/th&gt;
&lt;th align=&#34;center&#34;&gt;镜片/组&lt;/th&gt;
&lt;th align=&#34;left&#34;&gt;最近对焦&lt;/th&gt;
&lt;th align=&#34;left&#34;&gt;重量&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;简评&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;20mm/4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;10&lt;/sup&gt;&amp;frasl;&lt;sub&gt;8&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;210g&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;最锐的超广角镜头&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;20mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;11&lt;/sup&gt;&amp;frasl;&lt;sub&gt;8&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;235&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;21mm/4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.90&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;135&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;需要反光板预升&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;24mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;11&lt;/sup&gt;&amp;frasl;&lt;sub&gt;10&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;305&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;24mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;290&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;24mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;280&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;24mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;9&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;280&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;24mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;9&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;250&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;最多人拥有的广角头&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;215&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;230&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;220&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;240&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;8&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.20&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;250&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;号称尼康最好的广角&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/2.8E&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;150&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;8&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;384&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;8&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;355&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;28mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;8&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.25&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;360&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;酒吧之眼，暗部细节层次分明&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/3.5PC&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;290&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8PC&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;335&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8PC&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;330&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8PC&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;320&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;200&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;240&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;240&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2.8E&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;150&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;285&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;280&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;8&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;280&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;当标镜用&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;415&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;410&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;35mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;7&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;415&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;最值得拥有的镜头&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;45mm/2.8GN&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.80&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;155&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;45mm/2.8P&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIP&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.45&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;120&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;太薄啦&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;205&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;205&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;205&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.45&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;220&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;220&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;兼具实用和收藏价值&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.8E&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;220&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;325&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.45&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;325&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.45&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;260&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.45&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;250&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;大光圈标准镜，最便宜的高速头&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;50mm/1.2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;390&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;还是便宜&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;55mm/3.5Micro&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.24&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;235&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;55mm/3.5Micro&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.24&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;245&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;55mm/2.8Micro&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.25&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;290&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;经典铭镜，最锐利的尼康头&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;55mm/1.2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;420&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;55mm/1.2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;410&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;58mm/1.2Noct&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;485&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;夜之后，尼康的镇山之宝&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;58mm/1.4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;7&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.60&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;365&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;85mm/2&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.85&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;310&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;少见便宜&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;85mm/1.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.00&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;420&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;85mm/1.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;6&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.85&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;430&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;经典铭镜，早期证件照标准头&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;100mm/2.8E&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.00&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;215&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/4Micro&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.47&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;500&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/4Micro&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.47&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;500&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/2.8Mic&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;10&lt;/sup&gt;&amp;frasl;&lt;sub&gt;9&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.41&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;515&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/2.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.20&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;435&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/2.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.20&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;435&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/2.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.20&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;435&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;阿富汗人像镜，古老又优秀&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;105mm/1.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;经典铭镜，MTF4.4分&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;120mm/4Medic&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.35&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;890&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;135mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;460&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;135mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;400&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;135mm/3.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;3&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;400&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;135mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;620&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;135mm/2.8&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.30&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;430&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;便宜的大玻璃&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;135mm/2.8E&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;1.50&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;390&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;180mm/2.8ED&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;金圈，大光圈生态人像必备铭镜&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;200mm/4Micro&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;9&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;0.71&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;740&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;200mm/4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;2.00&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;630&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;200mm/4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;non-AI,AI&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;5&lt;/sup&gt;&amp;frasl;&lt;sub&gt;5&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;2.00&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;530&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;200mm/4&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;sup&gt;4&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;2.00&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;510&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;就是图个轻便&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;300mm/4.5&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;AI,AIS&lt;/td&gt;
&lt;td align=&#34;center&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;成像锐利，散景梦幻&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class=&#34;footnotes&#34;&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li id=&#34;fn:http-blog-sina-c&#34;&gt;主要是这个帖子: &lt;a href=&#34;http://blog.sina.com.cn/s/blog_56d9b0290100shmf.html&#34; target=&#34;_blank&#34;&gt;http://blog.sina.com.cn/s/blog_56d9b0290100shmf.html&lt;/a&gt; 因为新浪渣一样的阅读体验，整理过来自用。 &lt;a class=&#34;footnote-return&#34; href=&#34;#fnref:http-blog-sina-c&#34;&gt;↩&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        
      </description>
    </item>
    
    <item>
      <title>fopenmp option of clang error</title>
      <link>https://blog.dlilab.com/en/2017/06/21/fopenmp-option-of-clang-error/</link>
      <pubDate>Wed, 21 Jun 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/06/21/fopenmp-option-of-clang-error/</guid>
      <description>
        &lt;p&gt;When I try to source a Rcpp file, I got the following error under macOS:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;clang: error: unsupported option &#39;-fopenmp&#39;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After a little bit Googling, I found &lt;a href=&#34;http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/&#34; target=&#34;_blank&#34;&gt;this post&lt;/a&gt;, which at the end solved my problem. Briefly, I did the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Installed &lt;code&gt;xcode&lt;/code&gt; from Apple Store (a simplified version may be enough) or in Terminal with&lt;code&gt;xcode-select --install&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Installed &lt;code&gt;llvm&lt;/code&gt; via &lt;code&gt;brew install llvm&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Downloaded and installed the &lt;code&gt;gfortran&lt;/code&gt; binary installer from &lt;a href=&#34;https://gcc.gnu.org/wiki/GFortranBinaries#MacOS&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt;. Note: You will need to download the OS X El Capitan &lt;strong&gt;gfortran 6.1&lt;/strong&gt; binaries regardless of whether or not you are on macOS Sierra, which presently only offers gfortran 6.3.&lt;/li&gt;
&lt;li&gt;Downloaded and extracted &lt;code&gt;clang&lt;/code&gt; to &lt;code&gt;/usr/local/clang&lt;/code&gt; (overwrite it if already exists, &lt;code&gt;sudo cp -r ~/Downloads/usr/local/clang4 /usr/local/clang4&lt;/code&gt;). See &lt;a href=&#34;http://thecoatlessprofessor.com/programming/openmp-in-r-on-os-x/#gui-clang4&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; for more information.&lt;/li&gt;
&lt;li&gt;In terminal&lt;/li&gt;
&lt;/ol&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;   cat &amp;lt;&amp;lt;- EOF &amp;gt; ~/.R/Makevars
   # The following statements are required to use the clang4 binary
   CC=/usr/local/clang4/bin/clang
   CXX=/usr/local/clang4/bin/clang++
   LDFLAGS=-L/usr/local/clang4/lib
   # End clang4 inclusion statements
   EOF
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then, the error is fixed (for now)!&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/06/21/fopenmp-option-of-clang-error/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>南柯一梦</title>
      <link>https://blog.dlilab.com/cn/2017/05/25/dream/</link>
      <pubDate>Thu, 25 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/cn/2017/05/25/dream/</guid>
      <description>
        &lt;p&gt;昨晚做了一个比较诡异的梦，而梦里都是些我未曾谋面的人。具体细节已经想不太起来了，只记得是大家在&lt;a href=&#34;https://yihui.name&#34; target=&#34;_blank&#34;&gt;益辉&lt;/a&gt;家里聚会。诡异的是我从未见过益辉本人。可能是因为最近用他的 R 包用多了吧；再加上和他零星的一点网上的互动如在他网站留言之类的。于是就有了这么一个梦。&lt;/p&gt;

&lt;p&gt;益辉家的房子居然是我记忆中童年时候农村的一层砖瓦房。中间是一个很大的堂屋，两边是房间，再加一个和房间垂直排列的厨房。屋前是一片很宽阔的稻田，远处有青山。梦里的我还很诧异什么时候内布拉斯卡州开始种水稻了。我们一起在看 90 年代的那种很笨重的黑白电视；具体节目就记不得了。然后就是还记得益辉在给他儿子换尿布。&lt;/p&gt;

&lt;p&gt;十分诡异。&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;你站在桥上看风景&lt;br /&gt;
看风景的人在楼上看你&lt;br /&gt;
明月装饰了你的窗子&lt;br /&gt;
你装饰了别人的梦&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;此处可以把风景换成 R 包。&lt;/p&gt;

        
      </description>
    </item>
    
    <item>
      <title>Blog posts with academic styles</title>
      <link>https://blog.dlilab.com/en/2017/05/20/academic-posts/</link>
      <pubDate>Sat, 20 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/05/20/academic-posts/</guid>
      <description>
        &lt;!-- BLOGDOWN-HEAD --&gt;
&lt;!-- /BLOGDOWN-HEAD --&gt;

&lt;!-- BLOGDOWN-BODY-BEFORE --&gt;
&lt;!-- /BLOGDOWN-BODY-BEFORE --&gt;
&lt;p&gt;Goal: I want to write academic style blog posts with: citations, cross-reference of tables and figures, and I want to manage figure path by myself. The default setting of blogdown can handle citations and cross-references pretty well thanks to &lt;a href=&#34;https://yihui.name&#34;&gt;Yihui&lt;/a&gt;’s awesome work on &lt;a href=&#34;https://github.com/rstudio/bookdown&#34;&gt;&lt;code&gt;bookdown&lt;/code&gt;&lt;/a&gt; and &lt;a href=&#34;https://github.com/rstudio/blogdown&#34;&gt;&lt;code&gt;blogdown&lt;/code&gt;&lt;/a&gt; packages, but the figures are nested too deep. I just want to put all figures under &lt;code&gt;static/figures&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After a bit of digging, &lt;a href=&#34;https://github.com/rbind/daijiang/blob/master/R/build_one.R&#34;&gt;I managed to do this&lt;/a&gt;. The main trick is to add a &lt;code&gt;knitr&lt;/code&gt; setup chunk to the Rmd file, and then parse it with &lt;code&gt;blogdown::render_page()&lt;/code&gt;, based on &lt;a href=&#34;https://github.com/rbind/yihui/tree/master/R&#34;&gt;Yihui’s set up&lt;/a&gt;. If a post does not have any figures, it will pass the first step and go directly with &lt;code&gt;blogdown::render_page()&lt;/code&gt;. I did not look through all functions available from the &lt;code&gt;blogdown&lt;/code&gt; package. But I am sure there must be a better way to do this. Anyway, I get what I want at this moment.&lt;/p&gt;
&lt;hr /&gt;
&lt;div id=&#34;citations&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Citations&lt;/h2&gt;
&lt;p&gt;For citations, put the bibtex file in the same folder as the post, and then add &lt;code&gt;bibliography: ref.bib&lt;/code&gt; in the yaml. You can even define the citation styles via &lt;code&gt;csl: url_of_csl_file&lt;/code&gt; in the yaml.&lt;a href=&#34;#fn1&#34; class=&#34;footnoteRef&#34; id=&#34;fnref1&#34;&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/a&gt; Thousands of csl files are available at &lt;a href=&#34;https://github.com/citation-style-language/styles&#34;&gt;Github CSL repository&lt;/a&gt;. Go and find one you like and paste the url in the yaml.&lt;/p&gt;
&lt;p&gt;Testing paragraph: Invasion of non-native species, one of the most widespread and harmful consequences of global change, is causing worldwide ecosystem degradation and economic loss &lt;span class=&#34;citation&#34;&gt;(Vilà &lt;em&gt;et al.&lt;/em&gt;, &lt;a href=&#34;#ref-vila2011ecological&#34;&gt;2011&lt;/a&gt;; Simberloff &lt;em&gt;et al.&lt;/em&gt;, &lt;a href=&#34;#ref-simberloff2013impacts&#34;&gt;2013&lt;/a&gt;)&lt;/span&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;math-equations&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Math equations&lt;/h2&gt;
&lt;p&gt;Here is inline equations &lt;span class=&#34;math inline&#34;&gt;\(a^2 + b^2 = c^2\)&lt;/span&gt;; and display equations:&lt;/p&gt;
&lt;p&gt;&lt;span class=&#34;math display&#34;&gt;\[f(x)=\frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^{2}}{2\sigma^{2}}}\]&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;r-code-chunk&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;R code chunk&lt;/h2&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;summary(cars)&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;##      speed           dist    
##  Min.   : 4.0   Min.   :  2  
##  1st Qu.:12.0   1st Qu.: 26  
##  Median :15.0   Median : 36  
##  Mean   :15.4   Mean   : 43  
##  3rd Qu.:19.0   3rd Qu.: 56  
##  Max.   :25.0   Max.   :120&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div id=&#34;including-plots-and-cross-refer-it-back&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Including plots and cross-refer it back&lt;/h2&gt;
&lt;p&gt;You can also embed plots and cross-refer it with &lt;code&gt;\@ref(fig:figure-label)&lt;/code&gt;, for example Figure &lt;a href=&#34;#fig:pressure&#34;&gt;1&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;plot(pressure)&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;figure&#34;&gt;&lt;span id=&#34;fig:pressure&#34;&gt;&lt;/span&gt;
&lt;img src=&#34;https://blog.dlilab.com/figures/en/2017-05-20-ms/pressure-1.png&#34; alt=&#34;Here is figure caption.&#34; width=&#34;576&#34; /&gt;
&lt;p class=&#34;caption&#34;&gt;
Figure 1: Here is figure caption.
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id=&#34;table-and-cross-reference&#34; class=&#34;section level2&#34;&gt;
&lt;h2&gt;Table and cross-reference&lt;/h2&gt;
&lt;p&gt;You can also print tables and cross-refer it with &lt;code&gt;\@ref(tab:table-label)&lt;/code&gt;, for example Table &lt;a href=&#34;#tab:pressure2&#34;&gt;1&lt;/a&gt;:&lt;/p&gt;
&lt;pre class=&#34;r&#34;&gt;&lt;code&gt;knitr::kable(head(pressure), caption = &amp;quot;Table legend.&amp;quot;)&lt;/code&gt;&lt;/pre&gt;
&lt;table&gt;
&lt;caption&gt;&lt;span id=&#34;tab:pressure2&#34;&gt;Table 1: &lt;/span&gt;Table legend.&lt;/caption&gt;
&lt;thead&gt;
&lt;tr class=&#34;header&#34;&gt;
&lt;th align=&#34;right&#34;&gt;temperature&lt;/th&gt;
&lt;th align=&#34;right&#34;&gt;pressure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;right&#34;&gt;0&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0002&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;right&#34;&gt;20&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0012&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;right&#34;&gt;40&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0060&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;right&#34;&gt;60&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0300&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;odd&#34;&gt;
&lt;td align=&#34;right&#34;&gt;80&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.0900&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class=&#34;even&#34;&gt;
&lt;td align=&#34;right&#34;&gt;100&lt;/td&gt;
&lt;td align=&#34;right&#34;&gt;0.2700&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;That’s it.&lt;/p&gt;
&lt;p&gt;Any suggestions to improve this workflow? Comment below or send me a pull request. Thanks.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;references&#34; class=&#34;section level1 unnumbered&#34;&gt;
&lt;h1&gt;References&lt;/h1&gt;
&lt;div id=&#34;refs&#34; class=&#34;references&#34;&gt;
&lt;div id=&#34;ref-simberloff2013impacts&#34;&gt;
&lt;p&gt;Simberloff, D., Martin, J.-L., Genovesi, P., Maris, V., Wardle, D.A., Aronson, J., Courchamp, F., Galil, B., García-Berthou, E., Pascal, M. &amp;amp; others (2013) Impacts of biological invasions: What’s what and the way forward. &lt;em&gt;Trends in ecology &amp;amp; evolution&lt;/em&gt;, &lt;strong&gt;28&lt;/strong&gt;, 58–66.&lt;/p&gt;
&lt;/div&gt;
&lt;div id=&#34;ref-vila2011ecological&#34;&gt;
&lt;p&gt;Vilà, M., Espinar, J.L., Hejda, M., Hulme, P.E., Jarošík, V., Maron, J.L., Pergl, J., Schaffner, U., Sun, Y. &amp;amp; Pyšek, P. (2011) Ecological impacts of invasive alien plants: A meta-analysis of their effects on species, communities and ecosystems. &lt;em&gt;Ecology letters&lt;/em&gt;, &lt;strong&gt;14&lt;/strong&gt;, 702–708.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;footnotes&#34;&gt;
&lt;hr /&gt;
&lt;ol&gt;
&lt;li id=&#34;fn1&#34;&gt;&lt;p&gt;A local file in the same folder will work too.&lt;a href=&#34;#fnref1&#34;&gt;↩&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/05/20/academic-posts/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Reading notes: phylogenetic comparative models</title>
      <link>https://blog.dlilab.com/en/2017/05/13/reading-notes-phylogenetic-comparative-models/</link>
      <pubDate>Sat, 13 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/05/13/reading-notes-phylogenetic-comparative-models/</guid>
      <description>
        

&lt;blockquote&gt;
&lt;p&gt;Brief notes for &lt;em&gt;my own use&lt;/em&gt; from a short primer by &lt;a href=&#34;http://www.cell.com/current-biology/fulltext/S0960-9822(17)30348-2&#34; target=&#34;_blank&#34;&gt;Cornwell &amp;amp; Nakagawa, 2017, Current Biology&lt;/a&gt;. It is rather simple and basic, but can be a good intro/reminder about big pictures.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1 id=&#34;phylogenetic-comparative-methods&#34;&gt;Phylogenetic comparative methods&lt;/h1&gt;

&lt;p&gt;To explain the evolution of Earth&amp;rsquo;s diversity, phylogenetic comparative methods (PCM) often combine phylogeny with traits of species. The building of phylogenies (phylogenetics) is different from PCMs though they are not independent. PCMs are used to address the questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how did the characteristics of organisms evolve through time?&lt;/li&gt;
&lt;li&gt;what factors influenced speciation and extinction?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because species are not independent with each other, traditional linear regressions are not applicable. Felsenstein (1985), one of the first paper of PCMs, used phylogenetic independent contrasts to avoid this problem. Basically, instead of using species as data point, we can use the evolutionary branching point (divergence) as a replicate in the model.&lt;/p&gt;

&lt;h2 id=&#34;trait-evolution&#34;&gt;Trait evolution&lt;/h2&gt;

&lt;p&gt;We want to study the speed (tempo) and the manner (mode, e.g. slow and gradual, fast, with big jumps) of trait evolution. Common models are Briownian motion and Ornstein–Uhlenbeck models of trait evolution.&lt;/p&gt;

&lt;p&gt;We also want to study evolutionary links among traits and between traits and environmental variables. Advanced methods include generalized linear mixed models and structural equation models that account for species evolutionary relationships.&lt;/p&gt;

&lt;h2 id=&#34;lineage-diversification&#34;&gt;Lineage diversification&lt;/h2&gt;

&lt;p&gt;Why are some lineages more speciose than others of similar age? Where and when on the phylogeny were there shifts in diversification rate? And why did those shifts occur?&lt;/p&gt;

&lt;h2 id=&#34;pcms-in-different-disciplines&#34;&gt;PCMs in different disciplines&lt;/h2&gt;

&lt;p&gt;Other disciplines are also using PCMs, e.g. community ecology, linguistics, anthropology and paleobiology, by building phylogenies for e.g. languages.&lt;/p&gt;

&lt;h2 id=&#34;caveats-and-the-future-of-pcms&#34;&gt;Caveats and the future of PCMs&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Tree uncertainty. Species can be misplaced in a phylogenetic tree, ancestral nodes can be wrongly inferred, or more subtly, but more commonly, branch lengths are incorrect.&lt;/li&gt;
&lt;li&gt;Trait uncertainty. Traits are measured with error. And for most PCMs, we used representative values, but it is hard to define representative. For example, what is the representative value for human height?&lt;/li&gt;
&lt;li&gt;Model uncertainty. When we investigate trait evolution, we assume a certain model of evolution — most often, the Brownian motion model. However, a trait can evolve quite differently from such a simple model and there may be heterogeneity in the tempo and mode among the branches of the tree.&lt;/li&gt;
&lt;/ul&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/05/13/reading-notes-phylogenetic-comparative-models/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Notes of Data-driven Ecological Synthesis</title>
      <link>https://blog.dlilab.com/en/2017/05/09/notes-of-data-driven-ecological-synthesis/</link>
      <pubDate>Tue, 09 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/05/09/notes-of-data-driven-ecological-synthesis/</guid>
      <description>
        

&lt;p&gt;I went to the excellent data-driven ecological synthesis summer school at the &lt;a href=&#34;http://www.sbl.umontreal.ca/index.html&#34; target=&#34;_blank&#34;&gt;Station de Biologie des Laurentides (SBL)&lt;/a&gt; of the Université de Montréal, organized and taught by Timothée Poisot and Dominique Gravel. The station is one of the best research station I have ever been: great view, nice staffs, and excellent food! The teachers are very approachable and very knowledgeable. Classmates are very nice to each other and we had lots of fun together. For example:&lt;/p&gt;

&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Setted up a huge fire at the end of the day. &lt;a href=&#34;https://twitter.com/tpoi?ref_src=twsrc%5Etfw&#34;&gt;@tpoi&lt;/a&gt; &lt;a href=&#34;https://twitter.com/willvieira90?ref_src=twsrc%5Etfw&#34;&gt;@willvieira90&lt;/a&gt; &lt;a href=&#34;https://twitter.com/ernlarson?ref_src=twsrc%5Etfw&#34;&gt;@ernlarson&lt;/a&gt; &lt;a href=&#34;https://twitter.com/gwynmac?ref_src=twsrc%5Etfw&#34;&gt;@gwynmac&lt;/a&gt; &lt;a href=&#34;https://t.co/BaCnH5pUBp&#34;&gt;pic.twitter.com/BaCnH5pUBp&lt;/a&gt;&lt;/p&gt;&amp;mdash; Daijiang Li (@_djli) &lt;a href=&#34;https://twitter.com/_djli/status/860323102173134848?ref_src=twsrc%5Etfw&#34;&gt;May 5, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;



&lt;p&gt;and&lt;/p&gt;

&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Nice hiking after a day of open data/ project discussion. &lt;a href=&#34;https://twitter.com/tpoi?ref_src=twsrc%5Etfw&#34;&gt;@tpoi&lt;/a&gt; &lt;a href=&#34;https://t.co/5ZELNTKtWA&#34;&gt;pic.twitter.com/5ZELNTKtWA&lt;/a&gt;&lt;/p&gt;&amp;mdash; Daijiang Li (@_djli) &lt;a href=&#34;https://twitter.com/_djli/status/859926804995465216?ref_src=twsrc%5Etfw&#34;&gt;May 4, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;



&lt;p&gt;Thanks all for a great week.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Here is my very brief note during this one-week class.&lt;/p&gt;

&lt;h1 id=&#34;2017-05-01&#34;&gt;2017/05/01&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What is data? Observations of variables have value and unit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;meta data: when, who, how, why, intel. property?&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Data plan? (NSF funded: data one, data life cycle &lt;a href=&#34;https://www.dataone.org/data-life-cycle&#34; target=&#34;_blank&#34;&gt;https://www.dataone.org/data-life-cycle&lt;/a&gt;) (talked about 50 mins)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;collect&lt;/li&gt;
&lt;li&gt;assure: quality control:&lt;/li&gt;
&lt;li&gt;describe: meta-data?&lt;/li&gt;
&lt;li&gt;preserve: backup, ask computer center of University; figshare, etc. Be careful with Dropbox if you have government data etc. long-term archive. Who can have access?&lt;/li&gt;
&lt;li&gt;discover: identify data you need, which not necessary collected by yourself.&lt;/li&gt;
&lt;li&gt;integrate: put different temporary/spatial scales data together&lt;/li&gt;
&lt;li&gt;analysis: overview of the data analyses to conduct.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;exercise: 2-3 people/group, read a paper selected by themselves, discuss 2-3 steps of the data life cycle, how they did that? weakness? good? 20-30 mins.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Be serious about data archive/integration when applying for funding / writing grant reviewing.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href=&#34;http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004525&#34; target=&#34;_blank&#34;&gt;Ten Simple Rules for Creating a Good Data Management Plan&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href=&#34;http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005097&#34; target=&#34;_blank&#34;&gt;Ten Simple Rules for Digital Data Storage&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Spreadsheet: flat files&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;type &lt;code&gt;SEP3&lt;/code&gt;, &lt;code&gt;sept03&lt;/code&gt;, or &lt;code&gt;sep03&lt;/code&gt;; and excel turned it into &lt;code&gt;3-Sep&lt;/code&gt; or &lt;code&gt;9/3/2017&lt;/code&gt;. Even save as csv file at the end, they are all &lt;code&gt;3-sep&lt;/code&gt;, not what you typed in.&lt;/li&gt;
&lt;li&gt;tidy data: every column as variable, every row as an observation.&lt;/li&gt;
&lt;li&gt;NO THINGS: no merging cells, no color, no blank cells (be explicit about missing data and other possible issues that will result in missing data), no single information (no multiple tables)&lt;/li&gt;
&lt;li&gt;dates: YYYY-MM-DD-HH-MM-SS-TZ or split into date, time, and time zone.&lt;/li&gt;
&lt;li&gt;Location coordinates: be explicit about the format.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Template: use template to input data at the beginning of projects; when explain the variables, be explicit about possible values or rules to record. For example, how to name a site; for species, use Latin names; format of dates; etc.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Exercise: everyone creates a template for their own projects. 30 mins.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&#34;2017-05-02&#34;&gt;2017/05/02&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;OpenRefine (morning)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;explore different datasets: facets, transform of cells, filtering of rows, transform cells, explore scatter plots, e.g. &lt;code&gt;[value, cells[&amp;quot;mo&amp;quot;].value, cells[&amp;quot;dy&amp;quot;].value].join(&amp;quot;-&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;input datasets by multiple urls.

&lt;ul&gt;
&lt;li&gt;json files, select &amp;ldquo;rows&amp;rdquo; instead of &amp;ldquo;records&amp;rdquo; to make life easier.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Jupyter notebook + R (afternoon)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a little bit of data manipulation.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;parallel with plyr&lt;/code&gt;: &lt;code&gt;library(doMC); registerDoMC(detectCores() - 1); ddply(.parallel = T)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Book recommendation: &lt;a href=&#34;https://www.amazon.ca/Pragmatic-Programmer-Journeyman-Master/dp/020161622X&#34; target=&#34;_blank&#34;&gt;The Pragmatic Programmer: From Journeyman to Master&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&#34;2017-05-03&#34;&gt;2017/05/03&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Morning

&lt;ul&gt;
&lt;li&gt;Group discussion about mandatory data sharing/open (for and against, 2 groups, morning 45 mins)

&lt;ul&gt;
&lt;li&gt;debate.&lt;/li&gt;
&lt;li&gt;For: drive to a better science system (system &amp;gt; individuals)&lt;/li&gt;
&lt;li&gt;Against: unfair (synthesis vs data collectors;)&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Data sets and API (request/url and responses/json object); rOpenSci project/packages.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Afternoon

&lt;ul&gt;
&lt;li&gt;Discussion about possible projections till 3pm&lt;/li&gt;
&lt;li&gt;Dom gave a talk about how public data can do. (&lt;em&gt;Beyond the checklist: the biogeography of ecological interaction networks&lt;/em&gt;)

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;biogeograph&lt;/em&gt;: spatial and temporal distribution of species and abundance, including causes and consequences.&lt;/li&gt;
&lt;li&gt;the dominant conceptual tool in biogeograph: the niche.&lt;/li&gt;
&lt;li&gt;Is resource availability constant across gradients?&lt;/li&gt;
&lt;li&gt;predation pressure constant across gradients?&lt;/li&gt;
&lt;li&gt;how do covary interaction strength and pop abundance&lt;/li&gt;
&lt;li&gt;what about highly diverse communities?&lt;/li&gt;
&lt;li&gt;A community is more than a checklist&lt;/li&gt;
&lt;li&gt;how do we move from a regional meta web to a local web?&lt;/li&gt;
&lt;li&gt;revise &lt;em&gt;biogeograph&lt;/em&gt; by including species interaction&lt;/li&gt;
&lt;li&gt;Gravel et al 2011 Ecol. Lett.&lt;/li&gt;
&lt;li&gt;OBIS: marine occurrence data set.&lt;/li&gt;
&lt;li&gt;fishbase: fish characteristics.&lt;/li&gt;
&lt;li&gt;connectance very high in global Marian fish networks&lt;/li&gt;
&lt;li&gt;how do you control for data quality? &lt;em&gt;with huge datasets, the impact of errors may be not too problematic.&lt;/em&gt; More importantly, with complex pipeline of scripts, be careful about possible programming errors. &lt;em&gt;defensive programming&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;be careful about sensitivity of data analyses to data quality.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;talking about designing database.

&lt;ul&gt;
&lt;li&gt;be defensive when design: for example, set types of possible inputs (characters, small integers, etc. error control), api design (JavaScript), advantages of api: security, portability, remote working.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&#34;2017-05-04&#34;&gt;2017/05/04&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Morning&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dom. Gravel suggested books

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;An Illustrated Guide to Theoretical Ecology&lt;/em&gt; by Ted J. Case&lt;/li&gt;
&lt;li&gt;&lt;em&gt;The Theoretical Biologist&amp;rsquo;s Toolbox: Quantitative Methods for Ecology and Evolutionary Biology&lt;/em&gt; by Marc Mangel&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Rational data bases&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;advantages: efficiency, security, remove redundancy, faster query, allow multiple users work on the dataset at the same time&lt;/li&gt;

&lt;li&gt;&lt;p&gt;SQL: structural query language&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;SELECT sphote AS host, sppar AS parasite, COUNT(sppar) AS number, AVG(a) AS a
FROM morphometry 
WHERE host is &amp;quot;Disa&amp;quot;
GROUP BY sphote, sppar
HAVING number &amp;gt; 3
ORDER BY number DESC
LIMIT 4
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;a href=&#34;http://www.datacarpentry.org/sql-ecology-lesson/&#34; target=&#34;_blank&#34;&gt;SQL ecology data carpentry&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Afternoon&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brief about projects to work on. (4 projects, and I work on my own project)&lt;/li&gt;
&lt;li&gt;Work on projects&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&#34;2017-05-05&#34;&gt;2017/05/05&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Morning

&lt;ul&gt;
&lt;li&gt;Git/Github: common words e.g. repository, stage, commit, branch, merge&lt;/li&gt;
&lt;li&gt;License: &lt;a href=&#34;https://choosealicense.com/appendix/&#34; target=&#34;_blank&#34;&gt;choose a license&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;github commit emoji &lt;code&gt;📚 comments here&lt;/code&gt;; &lt;code&gt;✨ comments&lt;/code&gt; &lt;a href=&#34;https://github.com/slashsBin/styleguide-git-commit-message&#34; target=&#34;_blank&#34;&gt;list of emoji&lt;/a&gt; 🐛&lt;/li&gt;
&lt;li&gt;Illustrate collaboration via github&lt;/li&gt;
&lt;li&gt;Optimization coding

&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;http://dirk.eddelbuettel.com/papers/useR2010hpcTutorialHandout.pdf&#34; target=&#34;_blank&#34;&gt;R high performance tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://adv-r.had.co.nz/Profiling.html#performance-profiling&#34; target=&#34;_blank&#34;&gt;Hadley&amp;rsquo;s optimising code chapter&lt;/a&gt;: went through the R code a little bit.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Afternoon

&lt;ul&gt;
&lt;li&gt;work on project.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&#34;2017-05-06&#34;&gt;2017/05/06&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Work on project the whole day.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&#34;2017-05-07&#34;&gt;2017/05/07&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Morning

&lt;ul&gt;
&lt;li&gt;Work on project; started group presentations at 10:30am, till 12pm.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Afternoon

&lt;ul&gt;
&lt;li&gt;Back to Montreal at 3:30pm.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/05/09/notes-of-data-driven-ecological-synthesis/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>蒙特利尔</title>
      <link>https://blog.dlilab.com/cn/2017/05/05/montreal/</link>
      <pubDate>Fri, 05 May 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/cn/2017/05/05/montreal/</guid>
      <description>
        &lt;p&gt;现在佛罗里达已经是夏天了，白天最高能到 35 摄氏度了。因为有一个一周的专业相关的培训课程，两个月前开始申请加拿大的签证。签证很顺利，不到一个月就拿到了。只是中间的申请流程有点费时间。不过相比美国签证，加拿大的签证要容易的多。不用面签，网上申请和邮寄相关材料就行了。&lt;/p&gt;

&lt;p&gt;这周都在蒙特利尔度过了。蒙特利尔是加拿大魁北克省最大的城市。维度和中国沈阳和美国威斯康星州北部差不多。在威斯康星呆了五年，都已经适应了稍微寒冷的天气。基本上没有时间在蒙特利尔城里转，星期天晚上到，星期一一大早就坐车到一个开车一个半小时的研究站。&lt;/p&gt;

&lt;iframe src=&#34;https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d47218.265496906446!2d-74.01337963818193!3d45.97797414943719!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2sca!4v1493755397162&#34; width=&#34;600&#34; height=&#34;450&#34; frameborder=&#34;0&#34; style=&#34;border:0&#34; allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;这里算是偏远的山区了，基本没有外人。就是上课的十来个人和两个工作人员。其中大部分人是加拿大人。所以他们在一起都是说法语，就算是有我们不会说法语的人在一起。可能说法语的人都这样吧。一开始还有点不习惯，觉得这很不礼貌。不过久了也就无所谓了。但是还是觉得乖乖的。如果中国人和外国人在一起，很有可能大家不会说汉语。&lt;/p&gt;

&lt;p&gt;但是法国人做的饭确实挺好吃的。我这中国的胃，每餐也都吃得觉得撑了。早餐基本上是烤面包，偶尔还煎鸡蛋🍳。中午有意大利面，也吃过米饭（和我们的做法完全不一样）。下午偶尔有鱼。每餐的点心倒是都很好吃。&lt;/p&gt;

&lt;p&gt;可惜天气不是很好。一周就中间一天半没有下雨。没下雨的周二下午，在周边走了走，风景还不错。&lt;/p&gt;

&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Nice hiking after a day of open data/ project discussion. &lt;a href=&#34;https://twitter.com/tpoi?ref_src=twsrc%5Etfw&#34;&gt;@tpoi&lt;/a&gt; &lt;a href=&#34;https://t.co/5ZELNTKtWA&#34;&gt;pic.twitter.com/5ZELNTKtWA&lt;/a&gt;&lt;/p&gt;&amp;mdash; Daijiang Li (@_djli) &lt;a href=&#34;https://twitter.com/_djli/status/859926804995465216?ref_src=twsrc%5Etfw&#34;&gt;May 4, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;



&lt;p&gt;周三的晚上大家生了个很大的火🔥。见识了加拿大超级大的 Marshmallow (一个顶五个)。&lt;/p&gt;

&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Setted up a huge fire at the end of the day. &lt;a href=&#34;https://twitter.com/tpoi?ref_src=twsrc%5Etfw&#34;&gt;@tpoi&lt;/a&gt; &lt;a href=&#34;https://twitter.com/willvieira90?ref_src=twsrc%5Etfw&#34;&gt;@willvieira90&lt;/a&gt; &lt;a href=&#34;https://twitter.com/ernlarson?ref_src=twsrc%5Etfw&#34;&gt;@ernlarson&lt;/a&gt; &lt;a href=&#34;https://twitter.com/gwynmac?ref_src=twsrc%5Etfw&#34;&gt;@gwynmac&lt;/a&gt; &lt;a href=&#34;https://t.co/BaCnH5pUBp&#34;&gt;pic.twitter.com/BaCnH5pUBp&lt;/a&gt;&lt;/p&gt;&amp;mdash; Daijiang Li (@_djli) &lt;a href=&#34;https://twitter.com/_djli/status/860323102173134848?ref_src=twsrc%5Etfw&#34;&gt;May 5, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;



&lt;p&gt;周日下午回到蒙特利尔城里。本来计划爬上蒙特利尔大学后面的山去看市区的景色。结果在里面转了一个多小时也没转出去。只好打道回府，放弃了爬山的计划。&lt;/p&gt;

&lt;p&gt;坐公交车去中国城里找点吃的。本来是想吃炒河粉之类的。结果看到个自助餐，想着里面应该也有河粉。进去就刚吃第一口就后悔了：这是我有史以来吃过的最难吃的自助餐！没一个好吃的。而且现在年纪渐长，本来就吃不了多少东西了。不像初中的时候和几个哥们把人家饭店的饭吃光还不够。所以以后不到逼不得已，坚决不吃自助餐了。宁可去吃炒菜，虽然贵点，但是至少味道会比这好。&lt;/p&gt;

&lt;p&gt;回来的时候刚上公交，手机就没电了。（其实还有8%，但是苹果手机有个遇冷就关机的毛病。）心里咯噔一下，我这应该在哪里下车啊？还没来得及看手机地图的终点站啊！看样子今天不好有好结果了。最后凭着模糊的记忆，居然在正确的站下车了。主要是记得旁边有个小的教堂，跟司机核对了下就下车了。&lt;/p&gt;

&lt;p&gt;蒙特利尔算是加拿大比较大的城市了。在村里呆久了，真的不习惯这种城市的环境了。觉得到哪都是拥挤。大部分人都住公寓。就算是独栋的房子，周围也基本没有绿地和小孩子玩的地方。还是老实在村里呆着吧，偶尔进城打打牙祭就行。&lt;/p&gt;

        
      </description>
    </item>
    
    <item>
      <title>R packages installation issues</title>
      <link>https://blog.dlilab.com/en/2017/04/29/r-packages-installation-issues/</link>
      <pubDate>Sat, 29 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/04/29/r-packages-installation-issues/</guid>
      <description>
        

&lt;p&gt;Some R packages that require installation from source are hard to install. Here, I just record some of the problems and solutions I have came acroos when installing R packages on macOS.&lt;/p&gt;

&lt;h2 id=&#34;rgdal-package&#34;&gt;&lt;code&gt;rgdal&lt;/code&gt; package&lt;/h2&gt;

&lt;p&gt;It is kinda annoying to install this package. But I find &lt;a href=&#34;http://stackoverflow.com/a/26836125/3120725&#34; target=&#34;_blank&#34;&gt;this answer&lt;/a&gt; to be helful for me to install it.&lt;/p&gt;

&lt;p&gt;Basically, in terminal, install &lt;code&gt;GDAL&lt;/code&gt; first, which will take a while:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew install --with-postgresql gdal
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then in R:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;install.packages(&#39;rgdal&#39;, type = &amp;quot;source&amp;quot;, configure.args=c(&#39;--with-proj-include=/usr/local/include&#39;,&#39;--with-proj-lib=/usr/local/lib&#39;))
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;sf-package&#34;&gt;&lt;code&gt;sf&lt;/code&gt; package&lt;/h2&gt;

&lt;p&gt;According to its github &lt;a href=&#34;https://github.com/edzer/sfr&#34; target=&#34;_blank&#34;&gt;readme file&lt;/a&gt;, we may be able to install binary package for &lt;code&gt;sf&lt;/code&gt;. But this is not the case for me today. This may because that &lt;code&gt;R 3.4.0&lt;/code&gt; just released and they did not prepare a binary version on CRAN yet. So, I still need to install from source. In its readme file, we need to do this in terminal first (takes a while, ~10 minutes):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew unlink gdal
brew tap osgeo/osgeo4mac &amp;amp;&amp;amp; brew tap --repair
brew install proj 
brew install geos 
brew install udunits
brew install gdal2 --with-armadillo --with-complete --with-libkml --with-unsupported
brew link --force gdal2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then we can go to R and install it normally.&lt;/p&gt;

&lt;h2 id=&#34;to-be-updated&#34;&gt;to be updated&lt;/h2&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/04/29/r-packages-installation-issues/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Zoey 语录</title>
      <link>https://blog.dlilab.com/zoey/2017/04/18/zoey-words/</link>
      <pubDate>Tue, 18 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/zoey/2017/04/18/zoey-words/</guid>
      <description>
        &lt;p&gt;Zoey 小朋友的原创语录。开个头，慢慢更新。&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2017/04/18

&lt;ul&gt;
&lt;li&gt;早上起床，摸了一下 Zoey 的手臂，她看了一眼说：“不要摸我的手，会断的”。😂😂&lt;/li&gt;
&lt;li&gt;晚上吃晚饭，看着我碗里的鸡翅心想想的，但是她妈妈说辣。忍了好久，终于忍不住一把抢了过去啃了。配音：豁出去了。&lt;/li&gt;
&lt;li&gt;晚上睡觉前假装开火车，说：“我们去超市买菜，买饭，还有买妈妈的红薯”。&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/04/21

&lt;ul&gt;
&lt;li&gt;一言不合，就会把你的网络电源🔌关了。&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/04/29

&lt;ul&gt;
&lt;li&gt;上厕所的时候说：“妈妈，你看，水变成尿了。” 😄&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017年8月

&lt;ul&gt;
&lt;li&gt;高兴的时候会说：“爸爸 你是我的好王子。”&lt;/li&gt;
&lt;li&gt;妈妈：“我们家有哪些人？” Zoey：“有爸爸，妈妈，妹妹，还有奶奶，爷爷。” 又补充了一句：“我还有一个哥哥，叫大河。”&lt;/li&gt;
&lt;li&gt;Zoey: “妈妈，你肚子里的妹妹出来了吗？”&lt;/li&gt;
&lt;li&gt;妈妈爸爸准备在老二出生前以老二名义买一个玩具送给 Zoey。于是生完妹妹后，Zoey 去医院看妈妈和妹妹，爸爸拿出一条 Elsa 裙子，对 Zoey 说：“这是妹妹送你的礼物！你准备送妹妹什么？” Zoey：“我送妹妹奶瓶了，在柜子里。”&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/08/05

&lt;ul&gt;
&lt;li&gt;过去两个星期六 Zoey 都是在大河哥哥家过得。奥博阿姨和董暄叔叔星期六上午来接，周日上午再回来。帮了我们很大的忙：Zoey就像个永动机💃，高音喇叭📢，在家会把家揭翻的。&lt;/li&gt;
&lt;li&gt;今天又要去大河家了，约好在买菜的超市“交换人质”。在去的路上一直要听歌。边听边问：“爸爸，你的歌是哪里来的啊？” 我说在网上下的。Zoey 回答：“是在那个蜘蛛网🕷🕸上下的吗？”&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/10/25

&lt;ul&gt;
&lt;li&gt;Zoey 读书的时候总是不能集中注意力，不是手上玩玩具就是到处看，不听我们讲。教几遍英文单词还不会，妈妈就开始生气了。我倒不担心她学不学的会，我更希望她能过安静的坐一会。但是 Zoey 貌似天生就是个好动的孩子。最好搞得眼泪鼻涕到处是。可能是我们太急了。&lt;/li&gt;
&lt;li&gt;Zoey 上学也快半年了，英语基本没有太大的长进，还是只会一些零星的单词。经常嘴里念念有词的也不知道她在说什么。妈妈有点着急，总是和其他小孩子比。慢慢来吧，迟早会学会的。&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/11/30

&lt;ul&gt;
&lt;li&gt;Zoey 的叛逆期来的太早了。最近总是不听话。什么东西都是：“但是我想啊。。。” 妈妈去学校接她就经常听到老师投诉说 Zoey 不听老师的话，让我们在家里好好教育。但是在家教也没用啊。最近几天基本上晚上都是要哭的。不是吃饭不好好吃，就是玩具到处都是也不收拾。读书读完一本还要一本。睡觉总让人在门口陪。睡上 40 分钟都还没睡着。然后爸爸妈妈就有点发脾气了。后果就是每天都在哭泣中入睡。看着熟睡的 Zoey，心里又会有点内疚。真是让人又爱又恨。哎。&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/12/11

&lt;ul&gt;
&lt;li&gt;今天晚上回来，Zoey 坐在马桶上，看着我眼泪唰唰的就流了下来。我猜肯定又挨骂或者挨打了。接着她说：“爸爸明天早点回来给我洗澡好吗？” 哎，谁让你每天洗完澡总是挑衣服呢？&lt;/li&gt;
&lt;li&gt;“爸爸，你给我买这个好吗？” “好啊，但是爸爸没钱啊。” “那你去买钱好吗？”&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/02/11

&lt;ul&gt;
&lt;li&gt;Zoey 最近一周都在感冒。所以也就都没有去学校了。最近的流感季节来得可真是凶猛。她学校好多小孩子都感冒了。现在 Zoey 看起来好很多了。明天去学校希望不要再感冒啦。&lt;/li&gt;
&lt;li&gt;因为感冒去看医生，测了一下体重，最近一个半月居然体重没有一点点变化！和一个半月前一模一样的，也是奇怪。&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;2017/02/24

&lt;ul&gt;
&lt;li&gt;今天接 Zoey 回家的路上我说奶奶快回爷爷家去了。Zoey 难过的说不要。&lt;/li&gt;
&lt;li&gt;晚上给 Zoey 读一本小企鹅的书。小企鹅长大了以后就自己离开爸爸妈妈生活了。我说 Zoey 长大以后也会自己生活。Zoey 难过的说不要。要和爸爸妈妈还有妹妹一起生活。&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;

        
      </description>
    </item>
    
    <item>
      <title>鱼饵</title>
      <link>https://blog.dlilab.com/zoey/2017/04/15/fish-baits/</link>
      <pubDate>Sat, 15 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/zoey/2017/04/15/fish-baits/</guid>
      <description>
        &lt;p&gt;今天天气甚好。全家出去钓鱼🎣。转了两小时，鱼影子也没看见。&lt;/p&gt;

&lt;p&gt;Zoey 小朋友还挺兴奋，一定要和我一起握着鱼竿。小朋友最近说话有进步了点，句子能说 7，8 个词了。&lt;/p&gt;

&lt;p&gt;中途有一次鱼饵被吃掉了，我就说了声：“饵被鱼吃掉了”。Zoey 听见了跑过来摸摸我的耳朵说：“爸爸，你耳朵还在，没有被鱼吃掉啊”。&lt;/p&gt;

        
      </description>
    </item>
    
    <item>
      <title>Clipping shape files in R</title>
      <link>https://blog.dlilab.com/en/2017/04/12/clipping-shape-files-in-r/</link>
      <pubDate>Wed, 12 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/04/12/clipping-shape-files-in-r/</guid>
      <description>
        &lt;p&gt;Suppose we have two shape files: one larger (e.g. shapefile of ecoregions of North American) and one smaller (e.g. shapefile of US lower states). How can we get the shapefile of ecoregions for only the US lower states?&lt;/p&gt;

&lt;p&gt;After a little bit searching &lt;sup class=&#34;footnote-ref&#34; id=&#34;fnref:mainly-this-post&#34;&gt;&lt;a rel=&#34;footnote&#34; href=&#34;#fn:mainly-this-post&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;, I came with the following R function:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;library(rgeos)
library(sp)
clip_shp = function(small_shp, large_shp){
   # make sure both have the same proj
  large_shp = spTransform(large_shp, CRSobj = CRS(proj4string(small_shp)))
  cat(&amp;quot;About to get the intersections, will take a while...&amp;quot;, &amp;quot;\n&amp;quot;)
  clipped_shp = rgeos::gIntersection(small_shp, large_shp, byid = T, drop_lower_td = T)
  cat(&amp;quot;Intersection done&amp;quot;, &amp;quot;\n&amp;quot;)
  x = as.character(row.names(clipped_shp))
  # these are the data to keep, can be duplicated
  keep = gsub(pattern = &amp;quot;^[0-9]{1,2} (.*)$&amp;quot;, replacement = &amp;quot;\\1&amp;quot;, x)
  large_shp_data = as.data.frame(large_shp@data[keep,])
  row.names(clipped_shp) = row.names(large_shp_data)
  clipped_shp = spChFIDs(clipped_shp, row.names(large_shp_data))
  # combine and make SpatialPolygonsDataFrame back
  clipped_shp = SpatialPolygonsDataFrame(clipped_shp, large_shp_data)
  clipped_shp
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;By running &lt;code&gt;clip_shp()&lt;/code&gt; function, we will return a shapefile of the intersections between the two input files &lt;sup class=&#34;footnote-ref&#34; id=&#34;fnref:Of-course-you-ne&#34;&gt;&lt;a rel=&#34;footnote&#34; href=&#34;#fn:Of-course-you-ne&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;

&lt;p&gt;Another problem is that such kind of shapefiles are too large to plot. &lt;code&gt;ggplot()&lt;/code&gt; may run forever with the data frame fortified from the shapefile. One solution is to first convert the shapefile into a data frame, then thin the data frame. Simply using &lt;code&gt;dplyr::sample_frac()&lt;/code&gt; won&amp;rsquo;t work though. Here is a function I wrote (though kind of slow):&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;# the larger the tol is, the less rows the result will have
thin = function(x, tol = 0.01){
  id = unique(x$id)[1]
  x1 = x[, 1:2]
  names(x1) = c(&amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;)
  x2 &amp;lt;-shapefiles::dp(x1, tol)
  data.frame(long = x2$x, lat = x2$y, id = id)
}

library(ggplot2)
library(dplyr)
# convert shapefile to data frame
shp_df = fortify(shp, region = &amp;quot;NAME&amp;quot;) # change the region accordingly
# for each group, thin it
shp_df_thin = select(shp_df, long, lat, id, group) %&amp;gt;%
  group_by(group) %&amp;gt;%
  do(thin(., tol = 0.02))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then we can use the thinned data frame to happily/fastly plot with &lt;code&gt;ggplot()&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;ggplot(data = shp_df_thin) + 
  geom_polygon(aes(x = long, y = lat, group = group), 
               color = &amp;quot;black&amp;quot;, fill = &amp;quot;white&amp;quot;) +
  coord_map() 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Post here in case it will be helpful (to someone else or future myself).&lt;/p&gt;
&lt;div class=&#34;footnotes&#34;&gt;

&lt;hr /&gt;

&lt;ol&gt;
&lt;li id=&#34;fn:mainly-this-post&#34;&gt;mainly this post: &lt;a href=&#34;https://philmikejones.wordpress.com/2015/09/01/clipping-polygons-in-r/&#34; target=&#34;_blank&#34;&gt;https://philmikejones.wordpress.com/2015/09/01/clipping-polygons-in-r/&lt;/a&gt; &lt;a class=&#34;footnote-return&#34; href=&#34;#fnref:mainly-this-post&#34;&gt;↩&lt;/a&gt;&lt;/li&gt;
&lt;li id=&#34;fn:Of-course-you-ne&#34;&gt;Of course, you need to read them first into R. E.g. &lt;code&gt;small_shp = rgdal::readOGR(&amp;quot;path/to/file&amp;quot;, layer = &amp;quot;file_name&amp;quot;)&lt;/code&gt; &lt;a class=&#34;footnote-return&#34; href=&#34;#fnref:Of-course-you-ne&#34;&gt;↩&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/04/12/clipping-shape-files-in-r/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>Writing Academic Papers with Rmarkdown</title>
      <link>https://blog.dlilab.com/en/2017/04/05/writing-academic-papers-with-rmarkdown/</link>
      <pubDate>Wed, 05 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/en/2017/04/05/writing-academic-papers-with-rmarkdown/</guid>
      <description>
        

&lt;blockquote&gt;
&lt;p&gt;TL;DR: Rmarkdown and bookdown are awesome; you should use it to write papers; and &lt;a href=&#34;https://github.com/daijiang/workflow_demo&#34; target=&#34;_blank&#34;&gt;here&lt;/a&gt; is a minimal example.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I have been using LaTex for most of the &lt;a href=&#34;https://blog.dlilab.com/resume&#34;&gt;papers&lt;/a&gt; I have published so far (admittedly not that many), even though &lt;em&gt;all&lt;/em&gt; of my co-authors use Microsoft Word. Why? Several reasons for this.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When wrting, we should only focus on the content, not worrying about the typesetting, which we will take care later. Word, on the other hand, allows you to see what you get when you write. This makes people (me at least) hard to ignore the typesetting when writing.&lt;/li&gt;
&lt;li&gt;It is hard to update the figures and pictures inserted into the manuscript in Word. You need delete old ones and insert new ones whenever your figures are updated. Of course, you can say that do not insert figures until the submission. But wouldn&amp;rsquo;t it be easier to revise the manuscript when figures are included in the main text? Using LaTex, I can just put the path of figures there and not worry about replace them in the main text.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/Literate_programming&#34; target=&#34;_blank&#34;&gt;Literature programming:&lt;/a&gt; LaTex allows us to mix code with text in the same file, which increases the reproducibility and decreases potential errors.&lt;/li&gt;
&lt;li&gt;Cross-references is easy in LaTex (just &lt;code&gt;\label&lt;/code&gt; and &lt;code&gt;\ref&lt;/code&gt;). With Word, it is painful to get the same thing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, LaTex has its learning curve and quirks. And even though it intends to make people to focus on content, we usually spend lots of time fighting with things like floats. Not to mention the collaboration barrier betwen its users to Word users. When I finished a draft of my paper, I need to convert it to Word using pandoc so my advisor can edit. Doing it this way, however, figures and tables are usually messed up, as well as cross-references. Tables will be just LaTex source codes there; cross-references will be replaced with their labels (e.g. see Table tab-labels instead of see Table 1). So everytime, I need to write something like &amp;ldquo;please do not care about the typesetting&amp;rdquo; in the email to my advisor.&lt;/p&gt;

&lt;p&gt;Until recently, I found that the convertion from LaTex and Rmarkdown to Word is reasonably good, thanks to &lt;a href=&#34;https://bookdown.org/yihui/bookdown/&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;bookdown&lt;/code&gt;&lt;/a&gt; by &lt;a href=&#34;www.yihui.name&#34; target=&#34;_blank&#34;&gt;Yihui&lt;/a&gt;. I just finished my first manuscript written in Rmarkdown 100%. Both my advisor and I are quite happy with it. Therefore, in this post, I am going to talk briefly the process of writing academic papers with Rmarkdown.&lt;/p&gt;

&lt;h1 id=&#34;markdown-and-rmarkdown&#34;&gt;Markdown and Rmarkdown&lt;/h1&gt;

&lt;p&gt;First, you need to know a little bit about the &lt;a href=&#34;https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf&#34; target=&#34;_blank&#34;&gt;syntax&lt;/a&gt;. Don&amp;rsquo;t worry, I am sure you will get it in five minutes. If you use Rstudio, this can be found under &amp;ldquo;Help&amp;rdquo; menu.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/U8RHPbm.png&#34; alt=&#34;rmarkdown references&#34; /&gt;&lt;/p&gt;

&lt;h1 id=&#34;packages-needed&#34;&gt;Packages needed&lt;/h1&gt;

&lt;p&gt;In this post, I have installed the following R packages: &lt;code&gt;bookdown&lt;/code&gt;, &lt;code&gt;rmarkdown&lt;/code&gt;, &lt;code&gt;tufte&lt;/code&gt;, and &lt;code&gt;knitr&lt;/code&gt;. If you do not want to produce pdf files, then you are ready to go. If you need pdf files, then you need to install Latex. Under Windows and Linus, &lt;a href=&#34;https://www.tug.org/texlive/&#34; target=&#34;_blank&#34;&gt;Texlive&lt;/a&gt; is good; under Mac, &lt;a href=&#34;http://www.tug.org/mactex/&#34; target=&#34;_blank&#34;&gt;Mactex&lt;/a&gt; is available. If you do not mind the time to download and install, I recommend to install the full version, which includes all LaTex packages.&lt;/p&gt;

&lt;h1 id=&#34;writing-with-rmarkdown&#34;&gt;Writing with Rmarkdown&lt;/h1&gt;

&lt;p&gt;After installing all dependencies, we can open Rstudio (or any text editor) and start writing. I use Rstudio to start the file and work with R code chucks. For the remaining, however, I use Sublime text or Atom. This is mainly because the lack of distraction free function in Rstudio.&lt;/p&gt;

&lt;h2 id=&#34;yaml-head&#34;&gt;Yaml head&lt;/h2&gt;

&lt;p&gt;Here is the Yaml head I am using now:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-yaml&#34;&gt;---
title: Your awesome tile
author: &amp;quot;Author one and Author Two&amp;quot;
date: &#39;`r format(Sys.time(), &amp;quot;%d %B, %Y&amp;quot;)`&#39;
output:
  bookdown::tufte_html2:
    number_sections: no
    toc: yes
  bookdown::word_document2: null
  bookdown::pdf_document2:
    includes:
      before_body: doc_prefix.tex
      in_header: preamble.tex
    keep_tex: yes
    latex_engine: xelatex
    number_sections: no
    toc: no
bibliography: path/to/ref.bib
fontsize: 12pt
link-citations: yes
csl: https://raw.githubusercontent.com/citation-style-language/styles/master/global-ecology-and-biogeography.csl
---
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A few notes here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I use the &lt;code&gt;bookdown::pdf_document2&lt;/code&gt;, and other &lt;code&gt;bookdown::...document2&lt;/code&gt;, which allow cross-references and other features possible.&lt;/li&gt;
&lt;li&gt;For pdf files, I included some tex files (&lt;code&gt;preamble.tex&lt;/code&gt;, which includes some packages I use, e.g. lineno to add line numbers; and &lt;code&gt;doc_prefix.tex&lt;/code&gt;, which allows text align at left only).&lt;/li&gt;
&lt;li&gt;References are put in the bib file. You can use common reference management software to create a bib file. Or you can search through Google Scholar and click on &lt;code&gt;cite&lt;/code&gt; under the paper and choose &lt;code&gt;bibtex&lt;/code&gt; form, then copy and paste the information into a bib file.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;link-citations: yes&lt;/code&gt; allows you click on a citation/table/figure and jumpo to the corresponding location.&lt;/li&gt;
&lt;li&gt;csl files are journal style files and can be a url like here or a local file.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&#34;r-chunks&#34;&gt;R chunks&lt;/h2&gt;

&lt;p&gt;In my &lt;a href=&#34;https://github.com/daijiang/workflow_demo&#34; target=&#34;_blank&#34;&gt;project set up&lt;/a&gt;, I have &lt;code&gt;.Rproj&lt;/code&gt; file in the project folder, then I have &lt;code&gt;R&lt;/code&gt;, &lt;code&gt;Doc&lt;/code&gt;, etc. folders. R scripts are located within the &lt;code&gt;R&lt;/code&gt; folder while the Rmarkdown file for the manuscript is in the &lt;code&gt;Doc&lt;/code&gt; folder. By default, when you knit the Rmarkdown file with Rstudio, it will treat the folder where the Rmarkdown file seated as work space even though the &lt;code&gt;.Rproj&lt;/code&gt; file is in the folder one level up. This is a little bit annoying because the path will be different if you click the &lt;code&gt;knit&lt;/code&gt; button from running part of the chunks within Rstudio.&lt;/p&gt;

&lt;p&gt;To let Rstudio know that we want use the parent folder as the work space, we can add this chunk at the beginning of the file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;```{r knitr_options, echo=FALSE}
library(knitr)
opts_knit$set(root.dir = normalizePath(&amp;quot;../&amp;quot;))
```
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then in a &lt;em&gt;separate&lt;/em&gt; R code chunk, we can use source R script with &lt;code&gt;source(&amp;quot;R/script.r&amp;quot;)&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&#34;citations&#34;&gt;Citations&lt;/h2&gt;

&lt;p&gt;After put the sources you want to cite in a &lt;code&gt;.bib&lt;/code&gt; file, we can cite them in the main text. The idea is that each source will have one unique key, and you can cite it with the key. See the &lt;a href=&#34;http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html&#34; target=&#34;_blank&#34;&gt;rmarkdown website&lt;/a&gt; for details and examples.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Here is a statement [@key1; @key2].
@key3 did something.
Some examples [e.g. @key4; @key5; but see @key6]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src=&#34;https://i.imgur.com/EbKvlDr.png&#34; alt=&#34;example of citaitons in markdown&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;cross-references&#34;&gt;Cross-references&lt;/h2&gt;

&lt;h3 id=&#34;tables&#34;&gt;Tables&lt;/h3&gt;

&lt;p&gt;Insert tables by &lt;code&gt;knitr::kable&lt;/code&gt; function (&lt;code&gt;::&lt;/code&gt; tells that the &lt;code&gt;kable&lt;/code&gt; function is from &lt;code&gt;knitr&lt;/code&gt; package in R. Then cross-reference it back with: &lt;code&gt;see Table \@ref(tab:tableName)&lt;/code&gt;, which will return something like &lt;code&gt;see Table 1&lt;/code&gt;. The number of the table will depends on its order in the manuscript, therefore, whenever you reorder your tables, you do not need to worry about change their numbers by hand. And the R code chunk for the table looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;```{r tableName1,results=&#39;asis&#39;, echo=F}
knitr::kable(mtcars[1:5, 1:5], booktabs = T, caption = &amp;quot;Caption here.&amp;quot;)
```
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The awesome &lt;a href=&#34;https://CRAN.R-project.org/package=kableExtra&#34; target=&#34;_blank&#34;&gt;R package &lt;code&gt;kableExtra&lt;/code&gt;&lt;/a&gt; can be used to customize tables and figures. When render into Word document, if you used &lt;code&gt;library(kableExtra)&lt;/code&gt; earlier, this may &lt;a href=&#34;https://github.com/haozhu233/kableExtra/issues/477&#34; target=&#34;_blank&#34;&gt;mess up the tables&lt;/a&gt;. I added the following code in the set up chunk so that the package won&amp;rsquo;t be loaded if knit to Word document.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-r&#34;&gt;if(knitr::is_latex_output() | knitr::is_html_output()){
  library(kableExtra)
} else {
  options(kableExtra.auto_format = FALSE) # for docx
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;figures&#34;&gt;Figures&lt;/h3&gt;

&lt;p&gt;Figures are very similar to cross-refer with tables. Basically, you use &lt;code&gt;Figure \@ref(fig:figName)&lt;/code&gt; to refer to it. And you put the lable (&lt;code&gt;figName&lt;/code&gt; here) and caption in the R code chunk:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;```{r figName, fig.width=7, fig.asp=1, fig.cap=&amp;quot;Your caption here.&amp;quot;}
plot(x, y)
```
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;See more examples in the &lt;a href=&#34;https://github.com/daijiang/workflow_demo/blob/master/Doc/ms.Rmd&#34; target=&#34;_blank&#34;&gt;github file&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;For complex figure or table captions, we can use &lt;a href=&#34;https://bookdown.org/yihui/bookdown/markdown-extensions-by-bookdown.html#text-references&#34; target=&#34;_blank&#34;&gt;text references&lt;/a&gt;. But make sure that &lt;em&gt;no space at the end of the text&lt;/em&gt;! Otherwise, the captions won&amp;rsquo;t be repaced by the text references in Word document.&lt;/p&gt;

&lt;p&gt;These pretty much cover most of the common features of scientific writing: citations, cross-references, tables, figures. You can checkout &lt;a href=&#34;https://bookdown.org/yihui/bookdown/&#34; target=&#34;_blank&#34;&gt;&lt;code&gt;bookdown&lt;/code&gt;&lt;/a&gt; website for details. Even though &lt;code&gt;bookdown&lt;/code&gt; is made for writing books, it is actually very good for writing papers too!&lt;/p&gt;

&lt;p&gt;How do you set up Rmarkdown for writing? What tips do you have? Issues? Comments are very welcome. Or even better, you can click the &lt;code&gt;pen on paper&lt;/code&gt; button at the top right of the post and edit it.
&lt;img src=&#34;https://i.imgur.com/INZSdHa.png?1&#34; alt=&#34;edit this page&#34; /&gt;&lt;/p&gt;

&lt;p&gt;Thanks for reading and commenting!&lt;/p&gt;

        
        &lt;script&gt;window.location.href=&#39;https://blog.dlilab.com/en/2017/04/05/writing-academic-papers-with-rmarkdown/&#39;;&lt;/script&gt;
        
      </description>
    </item>
    
    <item>
      <title>杂事一箩筐</title>
      <link>https://blog.dlilab.com/cn/2017/04/05/trival-things/</link>
      <pubDate>Wed, 05 Apr 2017 00:00:00 +0000</pubDate>
      
      <guid>https://blog.dlilab.com/cn/2017/04/05/trival-things/</guid>
      <description>
        &lt;p&gt;四月份的杂事真多，其中最痛疼的莫过于每年的报税了。就不能搞的简单点么？寄出去了才发现最后那个问我要退多少回来的总数忘记填了。但是银行卡号都给你，意图很明显：全部都给劳资退回来呀！希望不要退回材料给我重新来过。&lt;/p&gt;

&lt;p&gt;OPT 快到期了，准备申请延期。系里面的工作人员太不给力，居然说让我去找 UFL 的 ISS 的人。但是我就只需要你给我找系主任签个名啊！我是去和 UW_Madison 申请好不好。明天继续和这 I983 表抗争，都浪费我大半天了。&lt;/p&gt;

&lt;p&gt;烦，回家和小朋友玩吧。&lt;/p&gt;

        
      </description>
    </item>
    
  </channel>
</rss>
