...@tibco.com 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 its source code?
Thank you
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)), ))
Thanks so much,
Santosh
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 AM
To: William Dunlap; R help
Subject: Re: [R] Strplit code
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, 2011, at 2:44 PM, William Dunlap wdun...@tibco.com wrote:
In S+ do.call's first argument
().
-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 is a bit strong, I think -- limited to single-pattern characters
is
more accurate
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 package
[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:
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)
]
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
illustrate recursion:
Strsplit - function(x, split){
if (length(x) 1) {
return(lapply(x, Strsplit
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 argument
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){
if
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
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
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
14 matches
Mail list logo