Can someone explain to me why this is marked as wrong. (See the attached). thanks
thanks for reaching out! Let’s go through the different answers.
1. ‘Vectors are a sequence of data elements that are of the same type’ – is correct.
2. ‘Multiplying two vectors returns a matrix’ – The multiplication of two vectors doesn’t always return a matrix, it could return only a single value(technically a single value could also be seen as 1×1 matrix, so this answer isn’t posed completely correctly).
3. ‘R returns an error message if you try to do operations on vectors of different lengths’ – When it comes to multiplying vectors of different lengths, R doesn’t throw an error. Instead it does so called ‘recycling’, i.e. recycles the shorter of the two vectors to match the length of the longer one and perform the operation.
4. ‘All of the above’. We’ve discussed that 2 and 3 are not true. => Only the first of the four answers is strictly true.