Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Instant Grammar Checker - Correct all grammar errors and enhance your writing

What's The REAL Secret To First Date Success With a Woman? Click Here To Find Out

Teach Your Child To Read

Powerful WordPress hosting for WordPress professionals

Disclosure: My content contains affiliate links.

29,957 questions

39,172 answers

573 users

How to divide two vectors in R

1 Answer

0 votes
vec1 <- c(20, 30, 40, 70, 90)
vec2 <- c(1, 2, 3, 4, 5)

result <- vec1 / vec2

print(result)



      
# run:
#
# [1] 20.00000 15.00000 13.33333 17.50000 18.00000
#

 


Protect Your Privacy - Download VPN


answered Jul 3, 2021 by avibootz

Related questions

1 answer 43 views
43 views asked Jul 3, 2021 by avibootz
1 answer 61 views
61 views asked Jul 3, 2021 by avibootz
1 answer 57 views
1 answer 39 views
1 answer 39 views
39 views asked Jul 5, 2021 by avibootz
...