Calculating total winnings in R | Calculation using vector | Question 1

R Programming Language Vector in R Language (Article) Vector in R Language (Program)

558

Program:

A_vector <- c(1, 2, 3)
B_vector <- c(4, 5, 6)

# Take the sum of A_vector and B_vector
total_vector <- A_vector + B_vector

# Print out total_vector
total_vector

Output:

> A_vector <- c(1, 2, 3)
> B_vector <- c(4, 5, 6)
> 
> # Take the sum of A_vector and B_vector
> total_vector <- A_vector + B_vector
> 
> # Print out total_vector
> total_vector
[1] 5 7 9

Explanation:

Done

This Particular section is dedicated to Programs only. If you want learn more about R Programming Language. Then you can visit below links to get more depth on this subject.