Wednesday, December 16, 2015

R GetoptLong, update to R 3.2.3

The R GetoptLong library was borrowed from PERL GetoptLong.

https://cran.r-project.org/web/packages/GetoptLong/vignettes/GetoptLong.pdf


It requires R 3.2.3. So, I updated R to 3.2.3.





#example from GetoptLong

# Rscript test-getoptlong.R --number 4 --verbose T
# Rscript test-getoptlong.R -n 4 --verbose T
library(GetoptLong)

cutoff = 0.05
GetoptLong(c(
  "number|n=i", "Number of items, integer, mandatory option",
  "cutoff|c=f", "cutoff to filter results, optional, default (0.05)",
  "verbose|v", "print messages"
))

print(c("input:", 'number'=number, 'cutoff'=cutoff, 'verbose'=verbose))



No comments:

Post a Comment