Exercise
-
Store your directory path in a global and set your directory using the global.
-
Store the number 4 in a local “number”, calculate and store the square root of the local "number" in a separate local “solution”. Use these two locals to store the sentence “The square root of [insert number] is [insert solution].” in the local “sentence” and display the sentence from the local.
-
Load the dataset "auto".
-
Create a local "var" which contains the variable name "rep78". Use an extended macro function to create a variable "lab" which extracts the variable label of the variable stored in local "var". Display the content of the local "lab". You can play around with the code by changing the content of the local "var" to other variable names.
-
Use the two locals to store the sentence "The label of variable [insert solution] is [insert solution]." Display the local "sentence". Try to find a way to display the variable label in quotes.