Message-ID: <BAY135-W25D48D9DC29CF8F9740CFA888D0@phx.gbl>
Date: 2009-03-30T15:45:40Z
From: Steve Murray
Subject: Column name assignment problem
In-Reply-To: <49D0C4DC.2080109@biostat.ku.dk>
Dear Peter, Jim and all,
Thanks for the information regarding how to structure 'assign' commands. I've had a go at doing this, based on your advice, and although I feel I'm a lot closer now, I can't quite get it to work:
rnames <- sprintf("%.2f", seq(from = -89.75, to = 89.75, length = 360))
columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720))
for (i in 1:120) {
Fekete_table <- get(paste("Fekete_", index$year[i], index$month[i], sep=''))
colnames(Fekete_table) <- columnnames
rownames(Fekete_table) <- rnames
assign(paste("Fekete_",index$year[i], index$month[i], sep=''),
colnames(Fekete_table))
}
This assigns the column headings to each table, so that each table doesn't contain data any longer, but simply the column values. I tried inserting assign(colnames(paste("Fekete_"...) but this resulted in the type of error that was mentioned in the previous message. I've run dry of ideas as to how I should restructure the commands, so would be grateful for any pointers.
Many thanks,
Steve
_________________________________________________________________
[[elided Hotmail spam]]