Re: [R] Renaming Within A Function

2011-12-22 Thread Greg Snow
111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Pete Brecknock > Sent: Thursday, December 22, 2011 12:15 PM > To: r-help@r-project.org > Subject: [R] Renaming Within A Function > > I am tryin

Re: [R] Renaming Within A Function

2011-12-22 Thread jim holtman
Why do you want to create a variable within the function since it will disappear after the return. Is there a reason for that? Here is one way of getting the names by just using them on the cbind. Also you are create a 'matrix' and 'names' is not appropriate for that type of object. > # Test Fu

[R] Renaming Within A Function

2011-12-22 Thread Pete Brecknock
I am trying to rename column names in a dataframe within a function. I am seeing an error (listed below) that I don't understand. Would be grateful of an explanation of what I am doing wrong and how I should rewrite the function to allow me to be able to rename my variables. Thanks. # Test Fun