There's more…

You can create a vector by providing a combination of character, numeric, and logical, but the output will be always a single type. Now, the question is, if you try to create a vector of mixed data types, then what will be the type of output vector? The answer follows the rules as follows:

  • A combination of character and any other data type produces a character vector
  • A combination of numeric and logical data type produces a numeric vector
  • A combination of complex and numeric or logical data type produces a complex vector
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset