On Mar 8, 2012, at 3:14 PM, Ajay Askoolum wrote:

Given

studentNumbers<-10;

subjEnglish<-sample(-1:100,studentNumbers,replace=TRUE);

when subEnglish <=0, 'U'
                        <=39, 'F'
                        <=49 'D'
                        <=59, 'C'
                        <=69, 'B'
                        <=79,'A'
                        <=100 'A+'
I can solve this using a series of 'if' 'else' statements. I am looking for a simple expression that will give the letter classification for every element of subEnglish.

?cut

(This should be explained and exemplified in any introductory material regarding R.)

--

David Winsemius, MD
West Hartford, CT

______________________________________________
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