Could you please show me what the code should be then? -- View this message in context: http://r.789695.n4.nabble.com/Function-not-working-as-I-d-like-tp4678878p4678898.html Sent from the R help mailing list archive at Nabble.com.