Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

R Programming: Create a list named s containing sequence of 15 capital letters, starting from ‘E’

R Programming: List Exercise-15 with Solution

Write a R program to create a list named s containing sequence of 15 capital letters, starting from ‘E’.

Sample Solution :

R Programming Code :

l = LETTERS[match("E", LETTERS):(match("E", LETTERS)+15)]
print("Content of the list:")
print("Sequence of 15 capital letters, starting from ‘E’-")
print(l)

Sample Output:

[1] "Content of the list:"
[1] "Sequence of 15 capital letters, starting from ‘E’-"
 [1] "E" "F" "G" "H" "I" "J" "K" "L" "M" "N" "O" "P" "Q" "R" "S" "T"                         

R Programming Code Editor:



Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a R program to assign NULL to a given list element.
Next: Write a R program to add 10 to each element of the first vector in a given list.

Test your Programming skills with w3resource's quiz.

What is the difficulty level of this exercise?