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

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:

主站蜘蛛池模板: 衢州市| 孝感市| 防城港市| 浙江省| 祁阳县| 化州市| 宜兴市| 琼中| 和龙市| 崇文区| 读书| 民勤县| 扎囊县| 龙游县| 芒康县| 安阳县| 诸城市| 彭水| 文山县| 远安县| 兰坪| 福建省| 游戏| 临高县| 永寿县| 高碑店市| 东兴市| 延川县| 文水县| 济阳县| 砚山县| 南木林县| 松阳县| 宜州市| 宜川县| 嘉峪关市| 东乌珠穆沁旗| 江安县| 新绛县| 遂溪县| 宁化县|