#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE); if (length(args) == 0) { stop("bar.R ") } pdf(paste(args[1],".pdf",sep="")); data = scan(file("stdin")); M = matrix(data); F = table(rowSums(M)) p = barplot(F,main=paste("Filmographie par année de",args[1]), xlab="Années",ylab="Nombre de films",xaxt="n"); axis(side=1,at=p,labels=sort(unique(data)),cex.axis=0.5,las=3);