# Read and plot a leaf in one go, select a leaf from a menu.
plot(readl())
# Make a pdf of all leaf files in the current working directory:
leaffiles <- list.files(pattern="\\.l$", ignore.case=TRUE)
pdf("Leaf files.pdf", onefile=TRUE)
for(i in 1:length(leaffiles))plot(readl(leaffiles[i]))
dev.off()Run the code above in your browser using DataLab