Discuss different data structures in R. Write program using R for the following tasks:
(i) Computation of income tax of a vector of size 10, consisting of the total annual income of 10 differentpersons. The tax computation should be 10%, if annual income is below 5 lakhs and 20% if it is above 5 lakhs.
(ii) Matrix addition, subtraction and multiplication
(iii) Finding inverse of a matrix
Sure, I'll break down the different data structures in R and provide code for the tasks you've mentioned.
### Data Structures in R:
R supports various data structures such as vectors, matrices, arrays, lists, and data frames.
1. Vectors: A vector is a collection of elements of the same data type. It can be created using the `c()` function.
____ ________ _________ __________ _________.
________ __________ __________ __________ _________ __________ ______ ______ _______ _____ _____.
____ _________ _________ _________ ___ ________ ___ ___ ______.
___ _____ ____ ________ ______ __________ _______ _____ __________ _________ _________.
_____ _________ ______ ______ _______ ______.
______ _______ ______ _______ ___ _________ __________ _________.
__________ _____ _____ _______ _________ ____ _______ ________ ___.
__________ __________ ___ ___ ____ ________ ______ _________ ______ ________ ___ _______.
____ _____ _________ ___ ____ _________ ___ _____ ______ _______.
_______ _________ ____ __________ _________ ________ ______ ______ ______ _____ ___.
___ __________ ____ ____ _______ ____ ______ ____.
_______ __________ _____ ____ __________ _________ _______ __________ _______.
_____ _________ ________ ______ __________ _________ __________ ___ ________.
__________ ___ __________ _____ _____ _________ _____ ___ ______ _________ ________ _______.
_____ _________ __________ ________ ____ __________ _____ ____ _________ _________ ____.
______ ____ ______ ________ ____ _______ ___ ___ _________.
_____ ________ ___ ___ _____ ____ ___ ______ _____ ______.
_____ _____ ________ _______ ________ _______ ______ __________.
________ ______ ________ ___ __________ _______ _________ _________.
____ ___ _________ _________ ____ _______.
_______ _____ ____ _____ ____ __________.
_____ ____ _________ ___ ____ _____ ______ __________ ____.
__________ ________ ___ ____ ____.
________ __________ ____ __________ ________ ________ _________ _______ ______.
___ ___ _______ ___ _________ __________ ___.
______ _________ _______ ___ _____ ___ __________ _______.
__________ __________ _______ _______ ____ __________ _________ _________ _________ ______ ____ _______.
____ ______ _____ ________ __________ _____ ______.
_________ _________ _____ ___ _________ ___ ___.
______ ___ ____ ___ ____.
Get Full Answer on WhatsApp