Skip to content

When is a number an integer?

This post poses a seemingly very simple question:

“When is a number an integer?”

and very quickly evolves to provide a delightful exposition of what it means when someone answers with “it depends”.

My vote is that the most intuitive and least-surprising approach is x%%1==0.

A Question’s Worth

We all know that answers have worth. Questions do too, though.

A big part of being a successful human, and scientist, is being able to assess the value of both.

Teaching and Entertainment

Every “modern” teacher knows that teaching requires a non-zero amount of entertainment in order for attention to be held. Entertainment, on the other hand, requires no teaching for the viewer’s attention to be held, although it often results in a more moving experience for the consumer.

For the consumer, it is definitely worth their time to determine whether that thing which they are consuming is teaching, or entertainment, because today’s producers are really, really great at convincing you that you are being taught when you are really just being entertained.

Cleaning Up Your Messes

There is a camper’s philosophy that “one should should leave the area cleaner than the state in which it was found”.

That is a beautiful philosophy because it doesn’t matter who made the mess, as the fact remains that the mess must be cleaned up.

Unless legal action is required, perhaps it is not even worth asking the question “Who made the mess?” and instead utilizing all resources to clean up the mess.

Useful functions in R never mentioned anywhere

which

ifelse

exists

A must-see of advanced babel usage in org with R

This post is a must-see of advanced babel usage in org with R

Cross Validated

Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It’s 100% free, no registration required.

Sometimes R segfaults with quartz

R plotting crashed a lot on OSX on my system:

archey
R --version
brew --version
                 ###
               ####                   User: gcr
               ###                    Hostname: orion
       #######    #######             Distro: OS X 10.9.3
     ######################           Kernel: Darwin
    #####################             Uptime: 2 days
    ####################              Shell: /usr/local/bin/bash
    ####################              Terminal: dumb
    #####################             Packages: 78
     ######################           CPU: Intel Core i7-4960HQ CPU @ 2.60GHz
      ####################            Memory: 16 GB
        ################              Disk: 26%
         ####     #####


R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.2.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see

http://www.gnu.org/licenses/.

0.9.5

Almost every time that I would use the quartz device, ℝ would segfault.

After changing it to X11, there have not been any segfaults. Perhaps I misunderstood the relationship between how the Brew build interacts with quartz.

Warn about unexpanded macros on export in org-mode

This post discussed the issues with failing to report macro expansion
issues during export of an org document. Most would want publishing to
fail if a macro is not defined. Soon, it will.

It is now addressed, as confirmed in that same thread.

How to clean up environment bindings in knitr sub modules?

This post discusses the management of the environment while running different
parts of the code. The author’s desire is to:

  • Obtain a list of bindings before execution sub-module
  • Execute the code in the sub-module
  • Upon completion of the sub-mode code execution remove anything that was added
    to the environment

Can definitely understand the desire. The approach makes total sense.

Perhaps now is the time for me to learn more about packages and whether that would be
a good approach here. Even running everything inside of a local block could be
an option perhaps?