R Programming: Create a list of heterogeneous data, which include character, numeric and logical vectors
R Programming: Basic Exercise-24 with Solution
Write a R program to create a list of heterogeneous data, which include character, numeric and logical vectors. Print the lists.
Sample Solution :
R Programming Code :
my_list = list(Chr="Python", nums = 1:15, flag=TRUE) print(my_list)
$Chr  "Python" $nums  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 $flag  TRUE
R Programming Code Editor:
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
Test your Python skills with w3resource's quiz
What is the difficulty level of this exercise?
- New Content published on w3resource:
- 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