[R] undefined columns selected!

MacQueen, Don macqueen1 at llnl.gov
Wed May 4 17:08:08 CEST 2016

First, type
and then type
and compare the output.

Probably, you will find a name in cn that is not among the names of msub.

To maybe make it easier to see the missing column(s), you can type

  setdiff(cn, names(msub))

The expression
is intended to select columns from msub. That error message means that you
are trying to select one or more columns that are not there.

Or perhaps Bert Gunter is correct, and it should be
but I believe that if that were the case the error message would likely be
different. Without more information we can't be sure.


Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550

On 5/4/16, 6:05 AM, "R-help on behalf of ch.elahe via R-help"
<r-help-bounces at r-project.org on behalf of 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,
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list