Tuesday, March 26, 2019

Pet Peeve #101

As I get older, I realize that I have more and more pet peeves. Some of them have been with me for a number of years, but others seem to crop up fresh.

Today's pet peeve is one that I think I have had in some form or another for a number of years, though it has been exacerbated by cell phones and online shopping.

Pet Peeve 101: Making it hard for customers to buy stuff that they want to buy.
I was at the supermarket the other day, and decided to use the self-checkout. The basic idea of the machine is fairly simple -- just scan each item and then pay when you are done. To the right of the machine is the "bagging station" where you can put your just scanned goods into a plastic bag.

Being environmentally conscious, I like to bring my own bags, so I put my bag on the ground.

It turns out that the "bagging station" is also a scale, and if the scale does not register the correct weight after you have scanned something, the machine gets angry with you. If the machine stays angry at you, it eventually calls a human over and you have to play the "let's scan everything again" game.

And, of course, the human takes their sweet time in getting to your station, making sure that they have finished chatting on their cell phone first.

Self-service machines can be seen as either a way to make commerce more efficient, a way to put checkout clerks out of a job, or both. After that experience, my take is that self-checkout machines are to shoppers as Microsoft Clippy was to authors. 

Lies, Damned Lies, and Data Falsification

It looks like Duke University has agreed to pay over $100 million dollars to settle allegations (without any admission of wrongdoing) of falsification of research data for NIH and other funding sources.

Coming on the heels of the college admissions scandals (which Duke was not implicated in), this has been a rough patch for higher education.

One certainly hopes that this most recent scandal does not lead to a further shrinking of already dwindling research dollars.

Wednesday, February 27, 2019

On a Slow Train to Nowhere

I came across a story on CNN about folks who had been trapped on an Amtrak train traveling from Seattle to Los Angeles. They had been stranded just south of Eugene due to snow for over 30 hours when I first saw the story.

That particular train was one I had taken several times when I was living in Eugene. Even on a good day, the trip from Eugene to Salinas (where I was usually headed) was about 18 hours. It is a very scenic route, but I'm not sure I'd want to spend more than a day on it.

That said, one thing that the article glossed over is that part of the issue is the fact that Amtrak trains do not have the right of way on this route. Amtrak owns the trains, but not the tracks that those trains run on. Because passenger rail is generally not as profitable as freight rail, passenger trains end up playing second fiddle once they get stuck.

It would be a mistake to think that Amtrak is problematic because it is government run (though there are certainly issues with that being the case). The private sector solution would be to get rid of passenger rail altogether.

Infrastructure anyone?


Tuesday, February 12, 2019

Table References in R Markdown to PDF

This is just a quick post for my own sanity. I spent a fairly decent amount of time trying to figure out how to reference tables in an RMarkdown document when outputting to PDF. For the record, I'm loading the booktabs and float packages in LaTeX (via the YAML header) and kable in R.

The trick that seemed to work is to put the LaTeX label as part of the kable argument: caption="\\label{tab:tabname}Caption text". The table can then be referred to in the text with \ref{tab:tabname}.

I'm sure that there are more elegant ways than this, but this seemed to get me what I needed for now.

Tuesday, January 29, 2019

Would You Like an Update With That Update?

Do you ever have one of those days when a simple task takes forever? You know, those days when you find yourself shaving a yak instead of getting work done?

That happened to me today. I was trying to track down a bit of missing data in an analysis I was doing. In the process of doing that, I came across the Data Explorer package for R, which seemed like it could be useful. (Definitely check it out if you are an R user.) However, my version of R was a little out of date, so I decided to do a, ahem, "quick" upgrade so that I could install the package.

Of course, if I'm going to update R I might as well update RStudio, right?

After updating R and RStudio, I soon realized that, for whatever reason, I could no longer knit to PDF. I spent a decent amount of time trying to troubleshoot the problem, including trying to update packages in MikTex, which was the LaTeX engine I was using. After going down a lot of rabbit holes, I did some Googling and realized that I wasn't the only one having this problem.

Long story short, it seemed like switching to tinytex was the preferred solution (which also meant spending time searching for a non-existent "uninstall" file for MikTeX). Eventually, I got everything back in working order (fingers crossed), but that was not before I had spent the better part of a few hours on my "quick" upgrade.

I guess the moral of the story (according to the bumper sticker) is, "If it ain't broke, fix it 'til it is."



Friday, January 25, 2019

Rocky Mountain Strike

So, another week, another strike. Just as the LAUSD teachers seem to have reached an agreement to end their strike, teachers in Denver, Colorado have voted to strike as early as January 28 according to news reports. Low compensation seems to be one of the primary reasons, as teachers complain that they are not earning a living wage given the cost of housing in the area.

Wednesday, January 16, 2019

New Year, New Strike

As of today (January 15, 2019), teachers from the Los Angeles Unified School District (LAUSD) have been on strike for two days. Although wages have been one of the demands, the bigger issue is the perceived lack of investment in education over the past several years and decades.

I can't recall any politician who has claimed that education is NOT a priority when campaigning. Funny how that passion never seems to make it past the swearing in ceremony.