Skip to content
Prev 323989 / 398503 Next

Request for Help on Named Vectors

Hi,
May be this helps:
month.dayslong<-rep(31,7)
?names(month.dayslong)<- c("January","March","May","July","August","October","December")
month.dayslong
# January??? March????? May???? July?? August? October December 
?# ??? 31?????? 31?????? 31?????? 31?????? 31?????? 31?????? 31 

?unname(month.dayslong)
#[1] 31 31 31 31 31 31 31
#or
?as.vector(month.dayslong)
#[1] 31 31 31 31 31 31 31
?identical(unname(month.dayslong),as.vector(month.dayslong))
#[1] TRUE
identical(unname(month.dayslong),month.dayslong)
#[1] FALSE
A.K.
?> ? ? 31 ? ? ? 31 ? ? ? 31 ? ? ? 31 ? ? ? 31 ? ? ? 31 ? ? ? 31
the vector , is there any command which will give only the numeric 
values : like? >31 31 31 31 etc...