Displaying 1 result from an estimated 1 matches for "biass".
Did you mean:
  bias
  
2009 Sep 18
1
what should names(x) be padded with when length(x) is increased?
...39;s to the length of the
main vector:  E.g.,
   > x<-1:3
   > names(x)<-c("One","Two")
   > str(x)
    Named int [1:3] 1 2 3
    - attr(*, "names")= chr [1:3] "One" "Two" NA
I expected this length mismatch to cause an error, but I am
biassed by my long usage of S and S+.  Is the extension by
padding with NA what is wanted?
Second, if we extend a named vector with length<- the main
vector is padded with NA's but the names are padded with
empty strings.  Should those be NA's?
   > x<-1:3
   > names(x)<-c("...