Slip4
Write an R program to extract first 10 English letter in lower case and
last 10 letters in upper case and extract letters between 22nd to
24th letters in upper case.
print("First
10 letters in lower case:")
a = head(letters,
10)
print(a)
print("Last
10 letters in upper case:")
a= tail(LETTERS,
10)
print(a)
print("Letters
between 22nd to 24th letters in upper case:")
b = tail(LETTERS[22:24])
print(b)
Output
> print("First 10 letters in lower case:")
[1] "First 10 letters in lower case:"
> a = head(letters, 10)
> print(a)
[1] "a" "b"
"c" "d" "e" "f" "g"
"h" "i" "j"
> print("Last 10 letters in upper case:")
[1] "Last 10 letters in upper case:"
> a= tail(LETTERS, 10)
> print(a)
[1] "Q" "R"
"S" "T" "U" "V" "W"
"X" "Y" "Z"
> print("Letters between 22nd to 24th letters in upper
case:")
[1] "Letters between 22nd to 24th letters in upper case:"
> e = tail(LETTERS[22:24])
> print(e)
[1] "V" "W" "X"