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

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:

主站蜘蛛池模板: 宁都县| 固镇县| 惠州市| 长泰县| 瓮安县| 双辽市| 陆良县| 棋牌| 宜春市| 永仁县| 尉犁县| 石林| 台安县| 东至县| 姜堰市| 明溪县| 如皋市| 邵阳市| 黄陵县| 铁岭市| 南木林县| 牟定县| 平阴县| 聂拉木县| 长沙县| 大庆市| 墨玉县| 綦江县| 元朗区| 金沙县| 兰西县| 钦州市| 嘉禾县| 旅游| 东山县| 平顶山市| 大同市| 确山县| 甘谷县| 宝鸡市| 峨边|