_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › Objects-TheirModesAndAttributes

Contents

1 Intrinsic attributes: mode and length
2 Changing the length of an object
3 Getting and setting attributes
4 The class of an object


1 Intrinsic attributes: mode and length #

> z <- 0:9
> digit <- as.character(z)
> digit
 [1] "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"
> d <- as.integer(digit)
> d
 [1] 0 1 2 3 4 5 6 7 8 9
> 

2 Changing the length of an object #

> e <- numeric()
> e
numeric(0)
> e[3] <- 17
> e
[1] NA NA 17
> alpha <- 1:10
> alpha <- alpha[2 * 1:5]
> alpha
[1]  2  4  6  8 10
> length(alpha) <- 3
> alpha
[1] 2 4 6
> 

3 Getting and setting attributes #

> attr(z, "dim") <- c(10, 10)

4 The class of an object #

> winter
> unclass(winter)
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:53

蟲 覈詩 讌襷 蟲 讌 蟆 . 蠏碁 讌ろ 襴れ 覓伎螻朱 覦蠖 給. 讌 蟆語願 れ 蠍一. 覈詞朱 覿讌 蟆 讌朱 蟇伎ろる 企 蟆 螳誤 給. 螳 一渚 讌 朱 螳 襦 覈旧 覲 螻 襷 給.