Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This may not completely answer your question, but note that dot methods in R become underscores in Sage.

sage:[tab]              r.read_csv          r.read_ftable
r.readBin           r.read_csv2         r.read_fwf
r.readChar          r.read_dcf          r.read_socket
r.readCitationFile  r.read_delim        r.read_table
r.readLines         r.read_delim2       r.read_table_url
r.read_DIF          r.read_fortran      r.readline
sage: r.read_table?
Definition:     r.read_table(self, *args, **kwds)
    read.table                package:utils                R Documentation

    Data Input


         Reads a file in table format and creates a data frame from it,
         with cases corresponding to lines and variables to fields in the


         read.table(file, header = FALSE, sep = "", quote = "\"'",
                    dec = ".", row.names, col.names,
           = !stringsAsFactors,
                    na.strings = "NA", colClasses = NA, nrows = -1,

I don't have your bar.txt, though, and unfortunately passing optional arguments can be tricky, sometimes calling for multiple levels of quotes, sometimes not. I've often used r.eval("R command") for that, like


which however is not ideal, but it gets the job done.