Comparing two lists with R

No, not list() lists.

a <- data.frame(name=old$NAME)
a$status <- "old"
b <- data.frame(name=allfields[allfields$StateAbbre=="ND",]$name)
b$status <- "new"


Make two data frames, one for each list, create a column identifying each one (new or old), then join on the common column (name).


Example output from comparing to lists in R using a merge().
Example output from comparing to lists in R using a merge().

See also:

Facebook for In-Depth Discussion?

Let me say right off the bat: I think Facebook is a great tool for passively receiving information and potentially for advertising your goods and services.

I do not think it is the best platform for in-depth discussion among several people. When I consider the characteristics of a good platform, I think of:

  • Ease of use (a GUI that makes sense and shows you everything without multiple clicks/taps)
  • Threaded conversation (although a limited hierarchy is better than an unlimited one)
  • Quote system
  • The ability to moderate (someone with the power to move posts/comments around)
  • Searchability
  • Stability
  • Non-intrusive sharing of content (this is a bonus, I suppose)

Obviously, when you’re having a conversation with a friend about where to eat, you don’t need most of these–it’s a limited scope and doesn’t need to be stored forever, because all you need to see is the most recent message.

Let’s take an example from the real world. Here’s a post I want to share:

I want to share this post because I think more people should see it. On the desktop, I can use the native “Share” button (hey, this is better than I thought!), which includes the original post, not just the link:

Unfortunately, this doesn’t tell my friends that there is a whole conversation in the comments to this post, unless I state it in the text. On mobile, you don’t get this option–Facebook just shares the original link, not the post.

[mobile screenshot needed]

This is a little beside the point, right? Because what I want is conversation, not just content sharing. And by doing this, I’m potentially branching the conversation into multiple places (the original post has a comment thread, and then someone could comment on my post). There’s no way to share to the original post (we’ll call it a thread) without allowing comments on my sharing of it.

If I were sneakier, I could use the permalink to share the content–but only on desktop, not mobile. In case you don’t know, the permalink (permanent link to the piece of content) is stored in the timestamp. Right click and copy the URL to paste somewhere else. This is how you can link to a single comment.

That’s a pain in the butt, isn’t it?

Let’s look at readability. Here’s part of the comment thread. Facebook decides I don’t need to see all of it. Why wouldn’t I? That’s more taps/clicks to get to content that I may or may not have read (how would I know? Maybe I have a bad memory).

You’ll also notice that the screenshot above is of a comment (by the page, Benjamin Olson) to a comment (mine), on a post (by Benjamin Olson). Now, I can live with threading to a certain degree, but I’m much more comfortable with a linear conversation. YMMV. Luckily, Facebook caps this at two levels, so if I click “Reply” to a comment, Facebook jumps me to the bottom and tags the author. This is why so many of the comments in arguments you see on Facebook start with a full name–which would never happen in real life!

As an added barrier to readability, those comments that are replies at the limit of the hierarchy have no expressed relation to the comment to which they are replying. Real discussion board/forum software allows you to (very easily) quote what you are replying to, and includes a link to the original comment. Below, an example (

So what am I trying to say?

Facebook is great to stay in touch, but my opinion is that it is a poor platform for having real, back-and-forth, substantial discussion.

My examples here haven’t been great (and I didn’t give examples of every problem I see), but take some time to examine how your own conversational experience unfolds on Facebook. Are you avoiding replying because you think your replies won’t be seen? Are you confused by what people are saying and need to scroll up and down to understand the conversation? These are all barriers that need to be overcome.

I won’t give an exhaustive list because that would be…exhausting. Several million online “message boards” or “forums” (those are search terms you should use) exist where conversation can be had on any of a million subjects. Another alternative is a LISTSERV-like system like Google Groups–not perfect, but works pretty well if you really enjoy email. If you like to roll your own communities (and who doesn’t?), SMF is a great piece of software that we use at

Comments and questions welcome; hopefully I can clean up this piece in the future.

Raspberry PI – Email IP Address Script

I can’t take credit for most of this, but modified it slightly to include both network and public IP addresses.

With a Gmail address, you’ll need to allow access for less-secure apps at No idea whether you can make it work with 2FA.

Put the script somewhere (home/pi/scripts/?) and call from /etc/rc.local with a sleep 30 or similar command so you’re sure it boots up before trying to send.

See and citations therein for the original concept.

Use ThemeKey to Test Drupal Themes

Every so often I want to test a new theme on a live Drupal installation, but don’t want to break the website for anyone else. You can use ThemeKey to do this, although it is probably the simplest thing you can do with this module.

Navigate to

Create a new rule:

your user name
theme you want to see

You’ll be the only one who sees it. If you want to try out another theme, edit the rule.

High on Information

If you haven’t read Mr. Money Mustache’s excellent post The Low Information Diet, you really should. While you’re there, check out the rest of the blog.

I’ve realized recently (and this recurs, of course) that I’ve been reading the news for the sake of reading the news and “keeping up with things,” particularly the 2016 presidential election. Unfortunately, this is not only escapism in its purest form (let’s dream about a world we my candidate wins, and we all get puppies and rainbows*), it’s a waste of time, and it keeps me from doing the things that a) I want to be doing that b) will actually have an effect on the world.

I go back and forth on social media, as well–and I find myself sucked into not only the comparisons but the thoughts of “hey, I could do that [photography/writing/cooking/science], and if I got really good at it, I could make some extra money**…”–which is escapism again. Even with notifications off, there’s that little jolt of chemicals every time I look at Facebook or Twitter or Instagram or the latest poll results (with comments, of course). I don’t need it!

There’s nothing I want to escape from, and it’s time to rebuild the mindfulness machine. So here’s to that.



*That’s not what my candidate is promising, by the way. It’s a metaphor.
**Don’t worry, we’re not destitute. I’m on a savings kick right now and it’s pretty exciting.


PGP Public Key

If you want to send me an encrypted email, you can use the following public key:

Comment: GPGTools -



My main regret about not producing a webcomic* is that I don’t have a reason to provide timely updates about what is going on in my life.

*I don’t produce a webcomic because although it would be cool, I think other people already do a much, much better job of it.  Sort of like working for NASA.