Question:
newvar=scan('Live in the sunshine, swim in the sea, drink in the
wild air.',2);
Ans: NEWVAR is
equal to 'in'
The syntax of the SCAN
function is:
SCAN(string,wordCount,delimiters)
- The scan is used to return the required word which is mentioned
in the parameter wordCount from the input parameter string which is
further delimited by the characters.
- In our example, there are no delimiters, the default is space. we
have a string as 'Live in the sunshine, swim in the sea, drink in
the wild air.' and the wordCount as 2. which means that we need to
fetch the 2nd word from the string which is "in" and then we are
storing it in newvar.
- Thus newvar holds the string "in" and we can say that NEWVAR is
equal to 'in'.
(Feel free to drop me a comment, If you need any help)
Hope this Helps!!!
Please upvote as well, If you got the answer?
If not please comment, I will Help you with that...
SAS BASE PROGRAMMING Q newvar=scan('Live in the sunshine, swim in the sea, drink in the wild...
SAS BASE PROGRAMMING Q
newvar="Soak in' | 'the sunshine'; Select one: O a. NEWVAR is equal to 'Soak inthe sunshine' O b. NEWVAR is equal to 'Soak in the sunshine O C. NEWVAR is equal to 'Soak in the sunshine' O d. None of the other choices In the DATA step, what happens if a MERGE statement is used without a BY statement? Select one: a. The observations in the input data sets are appended /concatenated O b. There is...
SAS BASE PROGRAMMING Q
newvar=substr('The ocean stirs the heart, inspires the imagination., 8, 10); Select one: a. None of the other choices b. NEWVAR is equal to 'an stirs t' C. NEWVAR is equal to 'n stirs th' d. NEWVAR is equal to 'an' In which step can variable attributes (i.e. formats) be temporarily modified? Select one: a. PROC DATASETS b. PROC TABULATE c. None of the other choices d. DATA
SAS BASE PROGRAMMING Q
For the REPORT procedure, which of the following statements is false? Select one: a. It can create summary reports b. It displays labels by default c. It can create list reports d. None of the other choices Which of the following can be requested as option(s) to the PLOT statement in PROC GPLOT? Select one: a. None of the other choices b. Confidence limits C. Regression equation d. Regression line
SAS BASE PROGRAMMING Q
proc contents data-data1.admit; run; Select one: a. Creates a report containing summary statistics b. Creates a report containing status messages regarding execution c. Creates a report containing the variable attributes O d. Creates a report containing the observations data NULL; Select one: a. Instructs SAS to write output to the NULL data set in the work library. b. None of the other choices C. Instructs SAS to write output without creating a data set. d. Is...
SAS BASE PROGRAMMING M?C Q PLS HELLP!
The RETAIN statement can be used to Select one: a. Keep the values of only assigned variables from one iteration of the PROC PRINT step to the next b. Keep the values of all types of variables from one iteration of the DATA step to the next c. Keep the values of only assigned variables from one iteration of the DATA step to the next d. None of the other choices How many...
SAS BASE PROGRAMMING M?C Q PLS HELLP!!
Which statement(s) can be used in the GPLOT procedure to select observations (records)? Select one: a. WHERE or IF b. None of the other choices c. WHERE O d. IF var r6 -- r11; *Note the two dashes! Select one: O a. Selects the variables that appear in consecutive order between r6 and r11 b. Selects the character variables that appear in consecutive order between r6 and r11 c. Selects the variables r6,...
Need help on M/C SAS base programing Q!!
newvar=input(start,date9.); Select one: a. None of the other choices b. This statement is used to instruct SAS on how to read in raw data c. This statement is used to convert a number into a character string d. This statement can be used in a PRINT procedure Which statement(s) can be used to select observations (records)? Select one: a. IF b. VAR c. All of the other choices d. COLUMN
SAS BASE PROGRAMMING Q
In work.ucsb, the format of the variable START is MMDDYY10. In work.ucla, the format of the variable START IS DATE7. After executing the following step, what is the format of the variable START in work.combined? data work.combined; set work.ucsb work.ucla; run; Select one: a. DATES b. It has no format c. MMDDYY10 d. DATE7
Sarita and Juanita are a married couple who live in Ohio, a common law sate. They are skible to file jointly but instead choose to file married/separately. In 2020, Sarita has AGI # $30,000 and itemizes deductions of $8,000, and Juanita has AGI of $50,000 and itemized deductions of $16 300 Juanita deducts her itemized deductions of $16,300, What is the taxable income for Sarta? Select one: O a. None of the other choices O b. $22,000 O c. $17,600...
I need some help
Naver V Live - Videa Google Drive Q Online Video Down... $ (Keepvid New) Kee.. English (en) 02 - Calculus II( Sect.21 ) Stion 5 yet answered The integral for the length of the curve y = 1+ 403,0 << < 1 is: Ked out of 3 Select one: Flag question о 1. 36rdt O (1 + 363) de 1+ 360 de O None stion 6 Using integration by parts, 3 cos 2.dx = wer saved...