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?
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework