Re: [R] undefined columns selected

2019-12-03 Thread Bert Gunter
Basically no clue, but note that C[, 1:length(C[ ,1])] looks suspect -- you are selecting the number of columns equal to the number of rows in C. Is that really what you want to do? Bert On Tue, Dec 3, 2019, 2:36 PM Ana Marija wrote: > Hello, > > I am trying to run this software: > > https://gi

[R] undefined columns selected

2019-12-03 Thread Ana Marija
Hello, I am trying to run this software: https://github.com/eleporcu/TWMR and I have my input files in my current directory: ENSG0154803.matrix, ENSG0154803.ld but when I try to run it: Rscript MR.R ENSG0154803 [1] "ENSG0154803" Error in `[.data.frame`(C, , 1:length(C[, 1])) :

Re: [R] undefined columns selected!

2016-05-04 Thread MacQueen, Don
First, type names(msub) and then type cn 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 msub[,cn] is intended to select columns

Re: [R] undefined columns selected!

2016-05-04 Thread Bert Gunter
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

Re: [R] undefined columns selected!

2016-05-04 Thread John McKown
On Wed, May 4, 2016 at 8:05 AM, ch.elahe via R-help 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 sel

[R] undefined columns selected!

2016-05-04 Thread ch.elahe via R-help
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 _

Re: [R] Undefined columns selected

2011-04-28 Thread Andrew Robinson
Jennifer, it looks like some of the columns that you are selecting don't exist. What is the output of str(arc) before you run the code below? Andrew On Thu, Apr 28, 2011 at 04:49:41PM -0700, Jennifer Wessel wrote: > This is part of my program. I am getting an error, that I cannot figure > ou

[R] Undefined columns selected

2011-04-28 Thread Jennifer Wessel
This is part of my program. I am getting an error, that I cannot figure out, any help would very much appreciated, thanks. # subset variables arc <- arc[,c("SNAP", "code", "ncode", "var", "n_total")] Error in `[.data.frame`(arc, , c("SNAP", "code", "ncode", : undefined col