Problems with variable type vector - USING R

0

I have the following problem and that is this sentence

summary(mydata3$AugmentFact)

I can not make it work because the object mydata3 does not exist, ok, I create the object mydata3 but apparently it is of type vector, well I think that variable of type vector but when I execute the sentence it gives me the following error ..

  

[36] ERROR: $ operator is invalid for atomic vectors

And the truth is I do not know how to create the vector because I think I believe it well but it does not work for me.

If someone could help me, I'd appreciate it.

Greetings.

    
asked by Roman345 16.10.2016 в 21:49
source

1 answer

1

in the documentation of the operator "$" says that it is only applicable for recursive objects (to see this you write in the console: ?"$" ).

A vector is not a recursive object, so you have to use brackets to select the attributes or elements you need.

>is.recursive(mydata3)
[1] FALSE

So you could try with the following command:

summary(mydata3['AugmentFact'])
    
answered by 19.10.2016 / 20:38
source