Re: [R] grep problem decimal points looping

2010-08-10 Thread David Winsemius
On Aug 10, 2010, at 11:14 AM, RCulloch wrote: Hi David, Thanks very much for that reply! I might be a touch out of my comfort zone, but I can see how the loop script works and where I went wrong, but I'm not sure if I am asking the correct questions here, or perhaps more accurately I'm

Re: [R] grep problem decimal points looping

2010-08-10 Thread David Winsemius
On Aug 10, 2010, at 9:17 AM, RCulloch wrote: Hi R Users, I have been trying to work out how to rename column names using grep, basically I have generated these column names using tapply: [1] "NAME" "X1.1" "X2.1" "X3.1" "X4.1" "X5.1" "X6.1" "X7.1" "X8.1" [10] "X1.2" "X2.2" "X3.2"

Re: [R] grep problem decimal points looping

2010-08-10 Thread RCulloch
Hi David, Thanks very much for that reply! I might be a touch out of my comfort zone, but I can see how the loop script works and where I went wrong, but I'm not sure if I am asking the correct questions here, or perhaps more accurately I'm using the wrong command for the task in question - and

Re: [R] grep problem decimal points looping

2010-08-10 Thread Henrique Dallazuanna
Try this also: nm <- scan('clipboard', what = '') transform(structure(do.call(rbind, strsplit(nm[-1], "\\.")), .Dimnames = list(NULL, c('V1', 'V2'))), V1 = gsub("X", "", V1)) On Tue, Aug 10, 2010 at 10:17 AM, RCulloch wrote: > > Hi R Users, > > I have been trying to work out how to rename column

Re: [R] grep problem decimal points looping

2010-08-10 Thread David Winsemius
On Aug 10, 2010, at 9:51 AM, David Winsemius wrote: On Aug 10, 2010, at 9:17 AM, RCulloch wrote: Hi R Users, I have been trying to work out how to rename column names using grep, basically I have generated these column names using tapply: [1] "NAME" "X1.1" "X2.1" "X3.1" "X4.1" "X5.1"

[R] grep problem decimal points looping

2010-08-10 Thread RCulloch
Hi R Users, I have been trying to work out how to rename column names using grep, basically I have generated these column names using tapply: [1] "NAME" "X1.1" "X2.1" "X3.1" "X4.1" "X5.1" "X6.1" "X7.1" "X8.1" [10] "X1.2" "X2.2" "X3.2" "X4.2" "X5.2" "X6.2" "X7.2" "X8.2" "X1.3