[R] undefined columns selected!

Bert Gunter bgunter.4567 at gmail.com
Wed May 4 16:55:51 CEST 2016


The the column name must be quoted in the index:

msubsub=msub[,"cn"]


Please go through a basic R tutorial  or two if you want to learn to use R.


Cheers,
Bert
Bert Gunter

"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Wed, May 4, 2016 at 6:05 AM, ch.elahe via R-help
<r-help at r-project.org> wrote:
>
> Hi all,
> I know it seems simple but I am trying to copy a code and I don't know what is the problem with this command!
>
>     msubsub=msub[,cn]
>
> the error I get is : error in '[.data.frame '(msub, ,cn) : undefined columns selected
>
> Thanks for any help,
> Elahe
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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