官术网_书友最值得收藏!

Character

Character data is always mentioned in quotation marks; anything contained in quotation marks is called a character string. Usually, character data is of both class and type character.

Let's create and check the class() and typeof() of different character objects in R. Follow the steps given below:

  1. Create the following objects:
a <- "apple"
b <- "7"
c <- "9-5-2016"
  1. Check the class and type of each using class() and typeof(), respectively, as follows:
class(a)
typeof(a)

class(b)
typeof(b)

class(c)
typeof(c)

Output: The preceding code provides the following output:

主站蜘蛛池模板: 淳安县| 旌德县| 荔浦县| 太康县| 柳河县| 小金县| 根河市| 稻城县| 调兵山市| 贵州省| 山阴县| 五大连池市| 昭苏县| 舟曲县| 乌兰察布市| 惠来县| 犍为县| 新津县| 洱源县| 聂拉木县| 五原县| 湟中县| 米脂县| 乌拉特前旗| 大方县| 古浪县| 大渡口区| 临桂县| 亳州市| 鲜城| 墨脱县| 鹤山市| 潼南县| 峡江县| 白山市| 独山县| 泰兴市| 遵化市| 通城县| 清流县| 和田市|