Conditional<- function(V)
{
Ab<-c()
For(i in 1:length(V){
If(V[i]>=80){
ans<-"Above_average"
}
else{"
ans<-Average"
}
Ab<-append(ab,ans)
}
Paste(ab, collapse=' ')
}
Conditional (c(70,80,89))
the output which i got was as follows "Average above_average above_average".still do not know,what is the problem?
Aucun commentaire:
Enregistrer un commentaire