[R] Error in ifelse(append, "a", "w") : , (list) object cannot be coerced to type 'logical'

Juan Antonio Balbuena j.a.balbuena at uv.es
Thu Jan 26 16:17:53 CET 2012


   Hello
   I will appreciate your help with the following.
   Running a script in R 2.14.1 under windows vista I get the following error
   message:
    Error in ifelse(append, "a", "w") :
     (list) object cannot be coerced to type 'logical'
   However, the very same script runs perfectly well under Ubuntu.
   My understanding is that this type of error is associated to writing data to
   disk. So the problem is likely caused by the following statements, which are
   inside a loop:
   P.vector <- c(P1, P2, P3)
   write (P.vector, file = "Type2_simul3_2012.txt", sep ="\t ", append =T).
   I  have read that including "\" in such statements can be problematic,
   because it is a scape character in R, but trying sep=" " instead of "\t" did
   not solve the problem.
   Any help will be much appreciated. Thanks in advance.
   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]j.a.balbuena at uv.es    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:j.a.balbuena at uv.es


More information about the R-help mailing list