Hi all,

I'm trying to get the min and max of a sequence of number using a loop like the folllowing. Can anyone point me to why it doesn't work.

Thanks.

type    <- c("min","max")
n       <- 1:10
for (a in 1:2)    {
print(type[a](n)) }


--
Muhammad

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to