To: William Dunlap
> Cc: Santosh; R help
> Subject: Re: [R] Strplit code
>
> Pardon my ignorance, but why is the do.call necessary? why not just execute
> the rbind function?
> What's the advantage in putting it in a do.call "wrapper"?
>
> On Sep 20,
gt; that gives the name of the function, so replace
> do.call(rbind, ...)
> with
> do.call("rbind", ...)
>
> Bill Dunlap
> Spotfire, TIBCO Software
> wdunlap tibco.com
> From: Santosh [mailto:santosh2...@gmail.com]
> Sent: Tuesday, September 20, 2011 2:55
0, 2011 2:55 AM
To: William Dunlap; R help
Subject: Re: [R] Strplit code
Dear R- Splus experts,
In R, I have frequently used do.call with strsplit. and I have a hard time with
Splus.. any suggestions?
for example, the R code below:
do.call(rbind,strsplit(paste(letters[1:10],c(1:10)),"
lap wrote:
> [R] Strplit code
> pomchip at free.fr pomchip at free.fr
> Wed Dec 3 20:52:21 CET 2008
>
> Dear R-users,
>
> The strsplit function does not exist in S-plus and I would like to
> use it. How
> could I reproduce the function in Splus or access to
[R] Strplit code
pomchip at free.fr pomchip at free.fr
Wed Dec 3 20:52:21 CET 2008
Dear R-users,
The strsplit function does not exist in S-plus and I would like to
use it. How
could I reproduce the function in Splus or access to its source code?
Thank you in advance
John Fox wrote:
> Dear Wacek,
>
> I've thought a bit more about this problem, and recall that I originally
> wrote Strsplit() [and replacements for sub() and gsub(), which were not then
> in S-PLUS] for the version of the car package that I released for S-PLUS,
> because other functions in the pack
replacement for
gregexpr().
> -Original Message-
> From: Wacek Kusnierczyk [mailto:[EMAIL PROTECTED]
> Sent: December-04-08 7:29 AM
> To: John Fox
> Cc: R help
> Subject: Re: [R] Strplit code
>
> John Fox wrote:
> > Dear Wacek,
> >
> > "Wrong"
Gabor Grothendieck wrote:
> R does not support tail recursion so not using it would
> not matter.
>
>
this is a feature, i guess.
another issue is that the recursive calls receive substrings as
arguments, which means copying the whole remaining content, and the
copies would not be deallocated
R does not support tail recursion so not using it would
not matter.
On Thu, Dec 4, 2008 at 5:04 AM, Wacek Kusnierczyk
<[EMAIL PROTECTED]> wrote:
> John Fox wrote:
>> By coincidence, I have a version of strsplit() that I've used to
>> illustrate recursion:
>>
>> Strsplit <- function(x, split){
>>
John Fox wrote:
> Dear Wacek,
>
> "Wrong" is a bit strong, I think -- limited to single-pattern characters is
> more accurate.
nothing is ever wrong if seen from an appropriate perspective. for
example, there is nothing wrong in that many core functions in r deparse
some, but not all, of the arg
sage-
> From: Wacek Kusnierczyk [mailto:[EMAIL PROTECTED]
> Sent: December-04-08 5:05 AM
> To: John Fox
> Cc: R help
> Subject: Re: [R] Strplit code
>
> John Fox wrote:
> > By coincidence, I have a version of strsplit() that I've used to
> > illust
John Fox wrote:
> By coincidence, I have a version of strsplit() that I've used to
> illustrate recursion:
>
> Strsplit <- function(x, split){
> if (length(x) > 1) {
> return(lapply(x, Strsplit, split)) # vectorization
> }
> result <- character(0)
> if (nchar(x) == 0) r
Dear Brian (and original poster),
My apologies -- I didn't notice the original posting.
By coincidence, I have a version of strsplit() that I've used to
illustrate recursion:
Strsplit <- function(x, split){
if (length(x) > 1) {
return(lapply(x, Strsplit, split)) # vectorization
On Wed, 3 Dec 2008, [EMAIL PROTECTED] wrote:
Dear R-users,
The strsplit function does not exist in S-plus and I would like to use it. How
could I reproduce the function in Splus or access to its source code?
With difficulty, as it is almost entirely implemented in C code (in
src/main/charact
Dear R-users,
The strsplit function does not exist in S-plus and I would like to use it. How
could I reproduce the function in Splus or access to its source code?
Thank you in advance,
Sebastien
__
R-help@r-project.org mailing list
https://stat.ethz.
15 matches
Mail list logo