elyakhlifi mustapha wrote:
>
> hello,
> how can I do to drop C from this character "C325" ?
>
1. if C is always single and always first:
> substring("C325",2)
2. more generic solution, drops all letters
> sp<-unlist(strsplit("C325",split="[A-Z]"))
> sp<-sp[nchar(sp)>0]
> sp
--
View this m
elyakhlifi mustapha wrote:
> hello,
> how can I do to drop C from this character "C325" ?
> x <- "C325"
> substring(x, first=2)
[1] "325"
> gsub("C", "", x)
[1] "325"
> gsub("[A-Z]", "", x)
[1] "325"
?substring
?gsub
>
> ___
hello,
how can I do to drop C from this character "C325" ?
_
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.
On Thu, 28 Sep 2006, Hans-Peter wrote:
> Hello,
>
> What's the best/recommended way to drop the dimension of a data.frame?
> Probably "test[,,]" but I am not sure. I would prefer an explicit
> function, but drop doesn't work with frames and I didn't find
> something in the helpfiles/mailarchive.
Hello,
What's the best/recommended way to drop the dimension of a data.frame?
Probably "test[,,]" but I am not sure. I would prefer an explicit
function, but drop doesn't work with frames and I didn't find
something in the helpfiles/mailarchive.
Example:
test <- data.frame( x = 1:7 )
str( drop(
Martin Maechler wrote:
> Wrong Mailing List !!
>
> Proposals for changes to R should be discussed on R-devel, see
> the posting guide.
> I'll reply separately, but only CC to R-devel.
You are right, but I think that this might be an overkill. But, who am I
to decide that anyway! I actually excite
Wrong Mailing List !!
Proposals for changes to R should be discussed on R-devel, see
the posting guide.
I'll reply separately, but only CC to R-devel.
Martin Maechler, ETH Zurich
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/lis
Balaji S. Srinivasan stanford.edu> writes:
> ...
Hello,
I agree with you that you find yourself typing the same constructs over and
over. I think that we need to distinguish two modes of working with R. If you do
analysis, then you can really get tired of typing drop=FALSE, na.rm=TRUE etc.
But th
Hi,
I know the topic of drop=TRUE/FALSE has been discussed quite a bit, but
I was wondering whether it might be possible to set "drop=FALSE" as a
global setting (e.g. as an option in options()) so that one does not
have to remember
to write it every time you do an operation which might return a 1
a <- data.frame(a = 1:2, b = c("a", "b"), c = I(c("a", "b")))
a <- a[ , !sapply(a, class) %in% "factor"]
-Original Message-
From: E. Michael Foster [mailto:[EMAIL PROTECTED]
Sent: Friday, June 17, 2005 10:58 AM
To: r-help@stat.ma
---
From: "E. Michael Foster" <[EMAIL PROTECTED]>
To:
Sent: Friday, June 17, 2005 4:57 PM
Subject: [R] drop elements of vector by class
> i'm trying to build a little summary table for the contents of a
> data frame.
>
> t<-sapply(macro, data.class)
>
i'm trying to build a little summary table for the contents of a data frame.
t<-sapply(macro, data.class)
c<-sapply(macro, length)
m<-sapply(macro, mean, na.rm=T, digits=2)
cbind(type=t, n=c , mean=m)
I want to drop the variables that are factors so I can include -max- and
-min- in my table.
-ma
his ...
h looks like your working with microarray data as well The actual
matrix that I am working with is 19000 x 340
Thanks for the help, that was perfect. I am still getting used to the R
language way of doing things.I will look into the apply function as you
have written it.
Pete
13 matches
Mail list logo