[R] Error in length of vector ?

Gabor Grothendieck ggrothendieck at gmail.com
Fri Mar 2 16:35:47 CET 2007


Suggest you review the help desk article on dates in
R News 4/1.   It mentions that POSIXlt objects are
lists with 9 components and other facts about date
objects in R.

On 3/2/07, Sérgio Nunes <snunes at gmail.com> wrote:
> Hi,
>
> I'm having a weird result with the length() function:
>
> >a
> [... omited ...]
> [9994] NA                    "2003-12-03 16:37:00" "2002-06-26 18:43:00"
> [9997] "2005-07-04 04:00:00" "2007-02-16 22:09:00" "2007-02-24 15:49:00"
> [10000] NA
>
> > length(LastModified)
> [1] 9
>
> > length(c(LastModified))
> [1] 9
>
> I was expecting to get "10000" as an answer.
> I'm trying to bind two vector, and I keep getting the error - "number
> of rows of result is not a multiple of vector length". Thus I tested
> length and got this value.
>
> Any hint?
>
> Thanks in advance,
> Sérgio Nunes
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list