1.

Write a function to extract the first name in the string “Mrs. Jake Luther”?(a) Substring(b) Substr(c) Substi(d) ReturnI got this question in an online interview.I want to ask this question from Functions topic in section Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The CORRECT answer is (b) Substr

The best I can EXPLAIN: The substr() function gives a part of a string. The substr() METHOD will give parts of a string, beginning at the character of the specified position, and returns the specified number of characters.



Discussion

No Comment Found

Related InterviewSolutions