Limit of matrix + naming

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Limit of matrix + naming

Chia, Yen Lin
Hi all,

 

I have read a data matrix of 304 x 404 using read.table.  When I am
trying to name the colnames, with first try colnames(L5)<-list(2:305),

I keep getting error message such as

 

Error in "colnames<-"(`*tmp*`, value = list(c(2, 3, 4, 5, 6, 7, 8, 9,  :


        length of 'dimnames' [2] not equal to array extent

 

and I don't know why.  But, if I look at the original names in terms of
V1, V2, the rownames are repeated again after V256.  Is there a
limitation?  

 

Thanks.

 

Yen Lin


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

R[1304] general protection rip - Error running R file in Batch mode

Srinivas Iyyer
hi group,
 I have a list of 100 elements (genes), that are to be
queried in postgres.  The out of the file is processed
for fisher test and written back as a file with
pvalues.
For one such operation there are 54 lines of code.

I replicated the same code changing the query element
and file name to write back.

I created a jumbo 100*54 = 5400 lines of code by
replication.

I saved this file as .R and ran it as:
R CMD BATCH myfile.R..

The program ran for ~40 mins. ( each operation takes 5
mins). after going home, I checked the stats and saw
that the program got aborted leaving 8 output files in
directory.

I checked /var/log/messages and found :

localhost kernel: R[1304] general protection
rip:2a988c919e rsp:7fbfff87f0 error:0


postgres did not log any error message.

This is my first time I am running my R code in BATCH
mode. I am a new to programming in R and I have been
working directly with R interface.

Could any one guess what could have been the problem.

Thanks
Sri

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: Limit of matrix + naming

Liaw, Andy
In reply to this post by Chia, Yen Lin
Looking at length(list(2:305)) and str(list(2:305)) can be instructive.  You
don't need the list(), and you probably want to use `legal' names for
variables.

Andy

From: Chia, Yen Lin

>
> Hi all,
>
>  
>
> I have read a data matrix of 304 x 404 using read.table.  When I am
> trying to name the colnames, with first try colnames(L5)<-list(2:305),
>
> I keep getting error message such as
>
>  
>
> Error in "colnames<-"(`*tmp*`, value = list(c(2, 3, 4, 5, 6,
> 7, 8, 9,  :
>
>
>         length of 'dimnames' [2] not equal to array extent
>
>  
>
> and I don't know why.  But, if I look at the original names
> in terms of
> V1, V2, the rownames are repeated again after V256.  Is there a
> limitation?  
>
>  
>
> Thanks.
>
>  
>
> Yen Lin
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R[1304] general protection rip - Error running R file in Batch mode

Srinivas Iyyer
In reply to this post by Srinivas Iyyer
Hi group,
I ran the file again and after 10 min. of run, the
process got interrupted.  

Here is the output of the file

$bash: R CMD BATCH grand.R > grand.log


 R CMD BATCH grand.R


/usr/local/lib64/R/bin/BATCH: line 55:  1758 Broken
pipe             ( echo "invisible(options(echo =
TRUE))"; cat ${in}; echo ''; echo "proc.time()" )
      1760 Segmentation fault      | ${R_HOME}/bin/R
${opts} >${out} 2>&1


Is this because of the excess query code in one .R
file?

Any suggestions, will help me .

thanks
Sri



>
> I created a jumbo 100*54 = 5400 lines of code by
> replication.
>
> I saved this file as .R and ran it as:
> R CMD BATCH myfile.R..
>
> The program ran for ~40 mins. ( each operation takes
> 5
> mins). after going home, I checked the stats and saw
> that the program got aborted leaving 8 output files
> in
> directory.
>
> I checked /var/log/messages and found :
>
> localhost kernel: R[1304] general protection
> rip:2a988c919e rsp:7fbfff87f0 error:0
>
>
> postgres did not log any error message.
>
> This is my first time I am running my R code in
> BATCH
> mode. I am a new to programming in R and I have been
> working directly with R interface.
>
> Could any one guess what could have been the
> problem.
>
> Thanks
> Sri
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R[1304] general protection rip - Error running R file in Batch mode

Duncan Murdoch
In reply to this post by Srinivas Iyyer
On 2/21/2006 8:24 PM, Srinivas Iyyer wrote:

> hi group,
>  I have a list of 100 elements (genes), that are to be
> queried in postgres.  The out of the file is processed
> for fisher test and written back as a file with
> pvalues.
> For one such operation there are 54 lines of code.
>
> I replicated the same code changing the query element
> and file name to write back.
>
> I created a jumbo 100*54 = 5400 lines of code by
> replication.

That's a fairly strange way to write such a thing.  Why not write a
single function, and run it in a loop?

>
> I saved this file as .R and ran it as:
> R CMD BATCH myfile.R..
>
> The program ran for ~40 mins. ( each operation takes 5
> mins). after going home, I checked the stats and saw
> that the program got aborted leaving 8 output files in
> directory.
>
> I checked /var/log/messages and found :
>
> localhost kernel: R[1304] general protection
> rip:2a988c919e rsp:7fbfff87f0 error:0
>
>
> postgres did not log any error message.
>
> This is my first time I am running my R code in BATCH
> mode. I am a new to programming in R and I have been
> working directly with R interface.
>
> Could any one guess what could have been the problem.

You haven't really given us much to go on.  You haven't stated the
version, or what packages and functions you are using.

I'd guess this is a bug with one of the packages you're using, but it
could be a bug in R.  Can you determine which line causes the error?
Does it happen if you extract just that line, and enough previous ones
to set things up for it?

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html