Hi,
In this particular example, you may not be able to remove any columns:
because:
namVar <-
c("TrlgWSST","TrlgWSSE","TrlgWSSR","SSdiff","TrlgWMSE","TrlgWR2","TrlgWR2adj","TrlgSSE","TrlgMSE","TrlgR2","TrlgR2adj","TrSSE","TrMSE","TrR2","TrR2adj","rdf2",
"TelgSSE","TelgMSE","TelgR2","TelgR2adj",
Hi,
I edited the code sorry,
I forgot the line before
Can you have look again please?
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/Remove-Column-from-matrix-tp4650334p4650348.html
Sent from the R help mailing list archive at Nabble.com.
___
Hello,
Three things:
1. You don't need an explicit comparison to TRUE,
if(all(Asse[,"SSdiff"]==0)){
will do the same.
2. Your matrix Asse doesn't have colnames, try to see the output of
colnames(Asse)
You forgot to assign colnames(Asse) <- namVar.
3. Even if it did, SSdiff is the 4th column,
Hi frespider,
I think the problem is first that you are referring to column names that you
haven't yet defined. To add the column names you can use the dimnames
argument of the matrix function.
Asse <- matrix(0,nrow=5,ncol=length(namVar), dimnames = list(NULL, namVar))
JoAnn
--
View this mes
Hello,
Try this:
idx<-sapply(file,function(x) all(unique(x)==1))
file[!idx]
# V2 V3 V4 V6 V7 V8 V9
#1 0 2 2 1 5 1 1
#2 0 2 2 1 5 1 1
#3 0 2 2 2 5 2 2
#4 0 2 2 1 5 1 1
#5 0 2 2 0 5 0 2
#6 0 2 2 1 5 1 0
A.K.
- Original Message -
From: Kate Dresh
On 25-08-2012, at 02:11, Kate Dresh wrote:
> *Hi all,*
>
>
>
> I'm trying to filter a file through the columns. This file below is a
> example of my data frame. My true data frame has seven hundred thousand
> columns and 500 hundred lines. I need to identify and to remove all columns
> that al
; "8", "9"), class = "AsIs")
>> 1
>> 4 7
>> 2
>> 5 8
>> 3
>&
>
- Original Message
From: Benilton Carvalho <[EMAIL PROTECTED]>
To: joseph <[EMAIL PROTECTED]>
Cc: r-help@r-project.org
Sent: Monday, February 18, 2008 11:47:50 AM
Subject: Re: [R] remove column names from a data frame
apparently you want to check the "Introduction t
7
2 5
8
3 6
9
>
----- Original Message
From: Benilton Carvalho <[EMAIL PROTECTED]>
To: joseph <[EMAIL PRO
Try this:
names(df) <- NA
or
names(df) <- make.names(seq(ncol(df)))
On 18/02/2008, joseph <[EMAIL PROTECTED]> wrote:
>
>
> I want to remove the column names from a data frame. I do
> it the long way, can any body show me a better way ?
>
>
> df= data.frame(chrN= c("chr1", "chr2", "chr3"), star
apparently you want to check the "Introduction to R" document I
found it very useful when I started working with R:
http://cran.r-project.org/doc/manuals/R-intro.pdf
try:
names(df) <- NULL
b
ps: "df" is the name of the function to get the density for an F
distribution...
On Feb 18,
11 matches
Mail list logo