Re: [R] Can't Destroy Dim Names

2010-11-30 Thread clangkamp
Dear David To confirm, your method worked. I am not allowed to divulge the original data (financial data), but here comes another set. Test_DF<-data.frame(Figure=c("A","B","A","B"), Code=c("C", "C", "D", "D"), No=c(1,2,3.5,4)) ?data.frame View(Test_DF) str(Test_DF) Test_DF_m<-melt(Test_DF, measur

Re: [R] Can't Destroy Dim Names

2010-11-30 Thread David Winsemius
On Nov 30, 2010, at 6:07 PM, clangkamp wrote: Dear Jim I think the target is to get from a Named chr to a just chr str(mat) Named chr [1:32268] "yQAAA" "jQAAQ" "UQAAg" "FQAAw" "1QABA" ... - attr(*, "names")= chr [1:32268] "CA" "CC" "CG" "CT" ... I have presum

Re: [R] Can't Destroy Dim Names

2010-11-30 Thread Phil Spector
Does this help? a = c(one=1,two=2,three=3) str(a) Named num [1:3] 1 2 3 - attr(*, "names")= chr [1:3] "one" "two" "three" names(a) = NULL str(a) num [1:3] 1 2 3 For a matrix called mat, you'd need to use dimnames(mat) = NULL to remove the dimnames. But remember that, other than when yo

Re: [R] Can't Destroy Dim Names

2010-11-30 Thread clangkamp
Dear Jim I think the target is to get from a Named chr to a just chr >> str(mat) > Named chr [1:32268] "yQAAA" "jQAAQ" "UQAAg" "FQAAw" "1QABA" ... > - attr(*, "names")= chr [1:32268] "CA" "CC" > "CG" "CT" ... I have presumably the same problem > str(DC1a) num

Re: [R] Can't Destroy Dim Names

2009-01-12 Thread Greg Snow
iginal Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Gundala Viswanath > Sent: Monday, January 12, 2009 6:32 PM > To: r-h...@stat.math.ethz.ch > Subject: [R] Can't Destroy Dim Names > > Dear all, > > I hav

Re: [R] Can't Destroy Dim Names

2009-01-12 Thread jim holtman
Is this what you want: > x <- c(a=1, b=2, c=3) > str(x) Named num [1:3] 1 2 3 - attr(*, "names")= chr [1:3] "a" "b" "c" > names(x) <- NULL > x [1] 1 2 3 > On Mon, Jan 12, 2009 at 8:32 PM, Gundala Viswanath wrote: > Dear all, > > I have the following matrix: > >> str(mat) > Named chr [1:32268]

[R] Can't Destroy Dim Names

2009-01-12 Thread Gundala Viswanath
Dear all, I have the following matrix: > str(mat) Named chr [1:32268] "yQAAA" "jQAAQ" "UQAAg" "FQAAw" "1QABA" ... - attr(*, "names")= chr [1:32268] "CA" "CC" "CG" "CT" ... I want to destroy the attribute yielding only this: > str(mat) Named chr [1:32268] "yQAAA