Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)

by jdporter (Canon)
on Dec 12, 2006 at 21:16 UTC ( #589418=note: print w/ replies, xml ) Need Help??


in reply to Re: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
in thread Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)

I don't know R... but, to my naive eye, that looks like it does neither the split nor the join. Is R one of those shell-like languages which implement lists as strings?

We're building the house of the future together.


Comment on Re^2: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
Re^3: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
by jbullock35 (Hermit) on Dec 13, 2006 at 09:45 UTC

    Is R one of those shell-like languages which implement lists as strings?

    No.

    I don't know R... but, to my naive eye, that looks like it does neither the split nor the join.

    You're right. The function posted above fails because it doesn't do the split or the join. R is lovely for statistics, but it's clumsy with text, despite efforts to implement Perl-like regex capabilities.

Re^3: Five Ways to Reverse a String of Words (C#, Perl 5, Perl6, Ruby, Haskell)
by moklevat (Priest) on Dec 13, 2006 at 16:59 UTC
    Dang it. No, it's not.

    This isn't a problem with R, it is a problem with me not thinking. Not only did I forget the split/join, the sort function I originally used only worked because my test case happened to be in alphabetical order. I have updated the original post with functioning code.

    My apologies to all of you who incorporated the broken code into your mission-critical systems.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://589418]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (12)
As of 2014-07-31 11:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (248 votes), past polls