Ask Question
24 May, 00:15

Try making a character (string) variable and a logical variable. Try creating a variable with a "missing" value NA. You can call these variables whatever you would like. Use class (variablename) to make sure they are the right type of variable.

+5
Answers (1)
  1. 24 May, 03:34
    0
    The solution code is written in R script.

    #string variable character_str< - "Hello World" #logical variable logic b #Missing value myVec <-c (1, 2, 3, NA) #Use class to check data type class (character_str) class (logic) class (myVec)

    Explanation:

    A string variable is a variable that hold a string (the letters enclosed within quotation marks) (Line 2)

    A logical variable is a variable that hold a logical value (either True or False). The logical value is created by comparing two variables (Line 5).

    In R, missing value is an unknown value which is represented by NA symbol (Line 8).

    We can use in-built method class to check for the variable type in R (Line 11-13). For example, the output of class (character_str) is "character"
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Try making a character (string) variable and a logical variable. Try creating a variable with a "missing" value NA. You can call these ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers