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

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:

主站蜘蛛池模板: 吉木萨尔县| 浦县| 望城县| 孟连| 赫章县| 嘉祥县| 马公市| 连江县| 平山县| 武冈市| 平山县| 新闻| 韶山市| 静宁县| 安徽省| 永德县| 涞源县| 桂平市| 象州县| 绥阳县| 无锡市| 兰西县| 扬州市| 宁蒗| 平谷区| 通渭县| 锡林浩特市| 虎林市| 泰兴市| 罗城| 房山区| 慈利县| 卓尼县| 淅川县| 无锡市| 大兴区| 三门峡市| 巴林右旗| 山丹县| 赤峰市| 武功县|