[R] how about a "<p-" operator?

Ista Zahn izahn at psych.rochester.edu
Thu Mar 31 01:16:30 CEST 2011


Hi Carl,
Well, we already have

(newobject <- somefunction()), so <p- would only save a single
keystroke at best, and none if you use an editor that auto-closes
parentheses...

Best,
Ista

On Wed, Mar 30, 2011 at 7:00 PM, Carl Witthoft <carl at witthoft.com> wrote:
> I was cursing Matlab again today (what else is new) because the default
> action for every Matlab command is to spew the result to the console, and
> one must remember to put that darn ";"  at the end of every line.
>
> So I just wondered:  was there ever a discussion as to providing some
> modified version of the "<-" and "->" operators in R to do the reverse?
>  That is, since R does not print the values of a command to the console,
>  what if there were  an operator such that
>
>
>  newobject <p- somefunction()
>
> would do the same as
>
> print(newobject <- somefunction())
>
>
> Any thoughts?
> Carl
>
> ______________________________________________
> R-help at r-project.org 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.
>



-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



More information about the R-help mailing list