Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve in R programing language. (1) Given a list X of integers, produce a list Y, whose ith member is 1 or 0 depending

Please solve in R programing language.

(1) Given a list X of integers, produce a list Y, whose ith member is 1 or 0 depending on whether the ith member of X is positive.

(2) Given a list whose every member is either an integer or a string, find how many members of the list are integers.

(3) Given a list whose every member is a list of integers, produce a vector containing the means of the member lists.

(4) Assume we have a vector of 3-letter initials and 2-letter initials, where the letters are separated by spaces. Write a command in R to extract the last initial of each vector component.

Example: For y <- c("J F K", "P Q R", "A B", "S T L", "P L")

the answer should be : "K" "R" "B" "L" "L"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions

Question

How to identify how you are at your best AppendixLO1

Answered: 1 week ago