hi,

Am Montag, 1. Dezember 2014, 11:12:48 schrieb Thomas Friedrichsmeier:
> See my last mail. I think defaulting to CSV (_not_ CVS2!) would be sensible.

ok, i'm all for it.

> Assorted comments:
> - Why is the "append" option controlled by the predefined format?

you just wrote it yourself:

> "append, col.names, sep, dec and qmethod cannot be altered."
  ^^^^^^^^

;-)

that option and the column names are the deactivated settings i was referring 
to, for write.csv() and write.csv2(). they are not all on the same tab -- i 
tried to make the dialog as similar to the import plugin as possible, but 
there are quite some differences.

> - Uncommenting arguments, that do not apply, is a nifty idea, but does come
> with some drawbacks:
>   - Bloats the generated code
>   - Seems to suggest that these _could_ be customized for write.csv(2).
> However, the R help says: "append, col.names, sep, dec and qmethod cannot be
> altered." I'd suggest stripping these.

sure, this is only an idea. but let me explain how it came to this: firstly, i 
was thinking about people who want to learn R; there should also appear an 
explaining comment above the write.csv() call explaining that the commented 
options cannot be changed here (btw, if you try, write.csv() throws a warning 
saying the same). secondly, the commented options show the value that they're 
set to internally; for instance, "col.names" depends on the setting of 
"row.names".

@aaron: what do you think would be most useful? the generated code currently 
reads:

  # some options can't be changed with write.csv()
  # they have been commented out to show the values they are set to
  write.csv(
    x=,
    file="",
    #append=FALSE,
    #sep=",",
    eol="\n",
    na="NA",
    #dec=".",
    row.names=TRUE,
    #col.names=NA,
    #qmethod="double",
    fileEncoding=""
  )

the stripped alternative would be:

  write.csv(
    x=,
    file="",
    eol="\n",
    na="NA",
    row.names=TRUE,
    fileEncoding=""
  )

the R code currently also includes all defaults. if we want to strip it down 
to the absolutely necessary arguments only, it would result in just this:

  write.csv(
    x=,
    file=""
  )

> - Remove the "data.frame"-warning (see my last mail).

with pleasure.

> - For encoding specification, import_spss and import_stata share some code
> (currently in the form of a <snippet>. It might make sense to turn this into
> an embeddable plugin, and use it.

i actually included that snipped first, but it added another full tab and had 
a checkbox for "converting strings" which i didn't find the best wording here. 
so i copied the dropdown menu -- and added the checked "(default)" option, 
since write.table() defaults to 'fileEncoding=""'.

having something to embed would be great, but i still didn't really get how to 
write an embeddable plugin ;-)


viele grüße :: m.eik

-- 
  dipl. psych. meik michalke
  institut f"ur experimentelle psychologie
  abt. f"ur diagnostik und differentielle psychologie
  heinrich-heine-universit"at d-40204 d"usseldorf

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel

Reply via email to