Bugs item #1623914, was opened at 2006-12-28 17:37
Message generated for change (Comment added) made by warnes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=1623914&group_id=48422

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: G�bor BORGULYA (borgulya)
>Assigned to: Gregory Warnes (warnes)
Summary: r.save fails while r("save...") works

Initial Comment:
I try to save a data.frame using R. The way I expected it to work does not 
work. An other way does work though. As I see no explanation to this, I think 
this is a bug.
Steps are detailed below:


1. GETTING THE DATA.FRAME
=========================

In [9]: d = r.read_DIF("spss_proba10_export.dif", header=True)

In [10]: r.class_(d).as_py(BASIC_CONVERSION)
Out[10]: 'data.frame'


2. THE SIMPLE SAVE COMMAND FAILS
================================

In [14]: r.save(d, file="spss_proba10_export.RData")
---------------------------------------------------------------------------
rpy.RException                                Traceback (most recent call last)

/home/gab/stat_munka/MJ/<console>

RException: Error in function (..., list = character(0), file = stop("'file' 
must be specified"),  :
        symbol print-name too long


3. A WORKAROUND
===============

In [12]: r.assign('d', d)
Out[12]: <Robj object at 0xb7c7f210>

In [13]: r('save(d, file="spss_proba10_export.RData")')
Out[13]: <Robj object at 0xb7c7f240>



----------------------------------------------------------------------

>Comment By: Gregory Warnes (warnes)
Date: 2007-10-17 22:28

Message:
Logged In: YES 
user_id=9316
Originator: NO

bourgulya wrote: 

  I found the error string "symbol print-name too long" in
  /trunk/rpy/src/R_eval.c line 158.
  I suspect that R might try to build a name for the nameless object (the
  Python representation of which is called d) and somehow it gets very
long.
        
One of the unresolved issues in rpy is problem of separate namespaces
between r and python.  When an r object defined in the python namespace is
passed to an R function that uses 'deparse(substitute())' to get the name,
the result is a complete string representation of the object itself.  For
relatively large objects, this can easily become too large for an R name.

The current workaround is to put the object into the R namespace with
r.assign(name, 'value').

-g                              

 

----------------------------------------------------------------------

Comment By: G�bor BORGULYA (borgulya)
Date: 2006-12-28 18:13

Message:
Logged In: YES 
user_id=131307
Originator: YES

I found the error string "symbol print-name too long" in
/trunk/rpy/src/R_eval.c line 158.
I suspect that R might try to build a name for the nameless object (the
Python representation of which is called d) and somehow it gets very long.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=453021&aid=1623914&group_id=48422

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to