,
H.
Best wishes,
Alrik
-Ursprüngliche Nachricht-
Von: Hervé Pagès [mailto:hpa...@fredhutch.org]
Gesendet: Samstag, 28. Februar 2015 23:29
An: Alrik Thiem; r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
Hi Alrik,
With the Biostrings/IRanges infrastructure
On Fri, Feb 27, 2015 at 5:19 PM, Alrik Thiem alrik.th...@gmail.com wrote:
I would like to replace all lower-case letters in a string that are not part
of certain fixed expressions. For example, I have the string:
pmin(pmax(pmin(x1, X2), pmin(X3, X4)) == Y, pmax(Z1, z1))
Where I would like to
...@aghmed.fsnet.co.uk]
Gesendet: Samstag, 28. Februar 2015 14:50
An: Alrik Thiem
Cc: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
Dear Alrik
This may seem a silly suggestion but why not just define new functions
PMIN and PMAX to call pmin and pmax. Obviously that does
: [R] Substring replacement in string
If your string will always represent an R expression, you could work with
the expression directly with functions like all.names() and substitute().
f - function (expr)
{
toReplace - setdiff(all.names(expr), c(pmin, pmax))
toReplace - grep
Hi Alrik,
With the Biostrings/IRanges infrastructure (Bioconductor packages), you
can do this with:
library(Biostrings)
x0 - BString(pmin(pmax(pmin(x1, X2), pmin(X3, X4)) == Y, pmax(Z1,
z1)))
donttouch_words - c(pmin, pmax)
## Extract the substrings to modify (target substrings).
-Ursprüngliche Nachricht-
Von: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Gesendet: Samstag, 28. Februar 2015 13:35
An: Alrik Thiem
Cc: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
On Fri, Feb 27, 2015 at 5:19 PM, Alrik Thiem alrik.th...@gmail.com wrote:
I
Grothendieck [mailto:ggrothendi...@gmail.com]
Gesendet: Samstag, 28. Februar 2015 13:35
An: Alrik Thiem
Cc: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
On Fri, Feb 27, 2015 at 5:19 PM, Alrik Thiem alrik.th...@gmail.com wrote:
I would like to replace all lower-case letters
Ah, I see what you mean. Thanks for suggesting. I'll try.
-Ursprüngliche Nachricht-
Von: Michael Dewey [mailto:i...@aghmed.fsnet.co.uk]
Gesendet: Samstag, 28. Februar 2015 17:31
An: Alrik Thiem
Cc: r-help@r-project.org
Betreff: Re: AW: [R] Substring replacement in string
Your original
Dear Gabor,
That works perfectly!
Many thanks and best wishes,
Alrik
-Ursprüngliche Nachricht-
Von: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Gesendet: Samstag, 28. Februar 2015 19:30
An: Alrik Thiem
Cc: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
...@aghmed.fsnet.co.uk]
Gesendet: Samstag, 28. Februar 2015 14:50
An: Alrik Thiem
Cc: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
Dear Alrik
This may seem a silly suggestion but why not just define new functions
PMIN and PMAX to call pmin and pmax. Obviously that does not solve your
problem
: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
On Fri, Feb 27, 2015 at 5:19 PM, Alrik Thiem alrik.th...@gmail.com wrote:
I would like to replace all lower-case letters in a string that are not part
of certain fixed expressions. For example, I have the string:
pmin
[mailto:hpa...@fredhutch.org]
Gesendet: Samstag, 28. Februar 2015 23:29
An: Alrik Thiem; r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
Hi Alrik,
With the Biostrings/IRanges infrastructure (Bioconductor packages), you
can do this with:
library(Biostrings)
x0 - BString
Thiem
Cc: r-help@r-project.org
Betreff: Re: [R] Substring replacement in string
If your string will always represent an R expression, you could work with
the expression directly with functions like all.names() and substitute().
f - function (expr)
{
toReplace - setdiff(all.names(expr), c
If your string will always represent an R expression, you could work with
the expression directly with functions like all.names() and substitute().
f - function (expr)
{
toReplace - setdiff(all.names(expr), c(pmin, pmax))
toReplace - grep(value = TRUE, [a-z], toReplace)
Dear R-help list,
I would like to replace all lower-case letters in a string that are not part
of certain fixed expressions. For example, I have the string:
pmin(pmax(pmin(x1, X2), pmin(X3, X4)) == Y, pmax(Z1, z1))
Where I would like to replace all lower-case letters that do not belong to
the
15 matches
Mail list logo