[R] (no subject)

Sarah Goslee sarah.goslee at gmail.com
Thu Jul 2 16:07:43 CEST 2009


Well, what's Ret_1 ? It's hard to answer your question without that crucial
bit of information.

Try
str(Ret_1)
and let us know what it says.

My first guess is that Ret_1 is a list, e.g.:

> testdata <- list(f1=c(1,2,3,4))
> length(testdata)
[1] 1
> length(testdata[[1]])
[1] 4
> str(testdata)
List of 1
 $ f1: num [1:4] 1 2 3 4

But we need more information to actually be able to help you.

Sarah

On Thu, Jul 2, 2009 at 9:01 AM, Andriy Fetsun<fetsun at googlemail.com> wrote:
> Hi Guys,
>
> It is very simple question, but I can't find the answer! Please help me.
>
> I use R and such simple function as length() doesn't work. The result is
> always 1 even if my data are more then 1 observations!
>
> Do I have to load any additional library?
>
>> length(Ret_1)
> [1] 1
>> length
> function (x)  .Primitive("length")
>
> Thank you!!!
>
> --

-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list