Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Two vectors X and Y are defined as follows – X <- c(3, 2, 4) and Y <- c(1, 2). What will be output of vector Z that is defined as Z <- X*Y.
Home
R Language
Two vectors X and Y are defined as follows – X <- c(3, 2, 4) and Y <- c(1, 2). What will be...
asked
Jul 28, 2019
in
R Language
by
Aarav2017
Two vectors X and Y are defined as follows – X <- c(3, 2, 4) and Y <- c(1, 2). What will be output of
vector Z that is defined as Z <- X*Y.
#r-language
#r-programming
#r-course
#r-tutorial
#r-question-answer
#r-interview-question
#r-basics
#r-test
#what-is-r
#learn-r
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jul 28, 2019
by
SakshiSharma
In R language when the vectors have different lengths, the multiplication begins with the smaller vector and continues till all the elements in the larger vector have been multiplied.
The output of the above code will be –
Z <- (3, 4, 4)
...