Question: 1 0 N 9 saved What does the following code do ( you may look at either the R or SAS code ) ? out

10N9
saved
What does the following code do (you may look at either the R or SAS code)?
out of 1.00
SAS:
data classdata;
set classdata;
if optimism>50 then IsOptimistic=1;
else if optimism>=0 and optimism=50 then IsOptimistic=0;
run;
R:
classdata$isOptimistic - ifelse(classdata$optimism >50,1,)
Select one:
a. Removes observations with optimism >50
b. Creates a new binary variable
c. Flags values of the variable "optimism" that are unrealistic
d. Divides the dataset into two smaller datasets
Clear my choice
 10N9 saved What does the following code do (you may look

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!