Same code - error in one PC but not in other

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

Same code - error in one PC but not in other

Tursiops

   Hello
   I am running exactly the same code on two different computers. In PC1 of the
   the code is working fine, whereas in PC2 I get this error
   Error in HP.LUT[, 1] : incorrect number of dimensions
   HP.LUT is an object within a function computed as HP.LUT <- which(HP ==1,
   arr.in=TRUE), where HP is a binary matrix.
   HP.LUT is not returned for further use. I have made sure that no object with
   the name HP.LUT is present in either PC1 and 2, and I have used both RStudio
   and R 3.01.
   So I am puzzled and wonder what the reason for this might be.
   Any hint will be much appreciated.
   Thank you very much for your attention
   Juan A. Balbuena

   --

   Dr. Juan A. Balbuena
   Marine Zoology Unit
   Cavanilles Institute of Biodiversity and Evolutionary Biology
   University of
   Valencia
   [1]http://www.uv.es/~balbuena
   P.O. Box 22085
   [2]http://www.uv.es/cavanilles/zoomarin/index.htm
   46071 Valencia, Spain
   [3]http://cetus.uv.es/mullpardb/index.html
   e-mail: [4][hidden email]    tel. +34 963 543 658    fax +34 963 543 733
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   NOTE! For shipments by EXPRESS COURIER use the following street address:
   C/ Catedrático José Beltrán 2, 46980 Paterna (Valencia), Spain.
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

References

   1. http://www.uv.es/%7Ebalbuena
   2. http://www.uv.es/cavanilles/zoomarin/index.htm
   3. http://cetus.uv.es/mullpardb/index.html
   4. mailto:[hidden email]
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Same code - error in one PC but not in other

Carl Witthoft
In the absence of any description of the computers themselves, it's hard to say,  but there's a good chance that there is some object in your working environment that's being accessed by your function -- and that object exists on only one of the machines.

I would suggest you use debug() or browser()  to see what the value of HP and HP.LUT are in each case.

Tursiops wrote
Hello
   I am running exactly the same code on two different computers. In PC1 of the
   the code is working fine, whereas in PC2 I get this error
   Error in HP.LUT[, 1] : incorrect number of dimensions
   HP.LUT is an object within a function computed as HP.LUT <- which(HP ==1,
   arr.in=TRUE), where HP is a binary matrix.
   HP.LUT is not returned for further use. I have made sure that no object with
   the name HP.LUT is present in either PC1 and 2, and I have used both RStudio
   and R 3.01.
   So I am puzzled and wonder what the reason for this might be.
   Any hint will be much appreciated.
   Thank you very much for your attention
   Juan A. Balbuena

   --

   Dr. Juan A. Balbuena
   Marine Zoology Unit
   Cavanilles Institute of Biodiversity and Evolutionary Biology
   University of
   Valencia
   [1]http://www.uv.es/~balbuena
   P.O. Box 22085
   [2]http://www.uv.es/cavanilles/zoomarin/index.htm
   46071 Valencia, Spain
   [3]http://cetus.uv.es/mullpardb/index.html
   e-mail: [4][hidden email]    tel. +34 963 543 658    fax +34 963 543 733
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   NOTE! For shipments by EXPRESS COURIER use the following street address:
   C/ Catedrático José Beltrán 2, 46980 Paterna (Valencia), Spain.
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

References

   1. http://www.uv.es/%7Ebalbuena
   2. http://www.uv.es/cavanilles/zoomarin/index.htm
   3. http://cetus.uv.es/mullpardb/index.html
   4. mailto:[hidden email]
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.