Write R code to perform the following: (a) Sum a matrix over all the columns using apply() (b) Convert strings in a vect

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write R code to perform the following: (a) Sum a matrix over all the columns using apply() (b) Convert strings in a vect

Post by answerhappygod »

Write R code to perform the following:
(a) Sum a matrix over all the columns using apply()
(b) Convert strings in a vector from lower case to upper case using lapply)
(c) Find number of characters in each string in a vector using sapplyO
(d) Find the sum of first elements, second elements upto last elements across
three vectors using mapply()
(e) In iris dataset, Species is a factor with 3 values namely Setosa, versicolor and virginica. Find the mean of sepal lengthofthese 3 species(subsets) using tapply()
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply