Last active
August 29, 2015 14:03
-
-
Save igroff/ded9637d6a01ab8fa747 to your computer and use it in GitHub Desktop.
Rscript to calculate 'stats' from a list of numbers on stdin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env Rscript | |
a <- scan(file("stdin"), c(0), quiet=TRUE); | |
cat(length(a), sd(a), min(a), max(a), mean(a), median(a), "\n"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment