On Sat, Jun 15, 2013 at 1:45 AM, David Winsemius wrote:
>
> On Jun 14, 2013, at 1:25 PM, Bert Gunter wrote:
>
>> For the record:
>>
>> ...
>>
>>
>>>
>>> A bit of commentary: Something did happen. It's just that you didn't do
>>> anything with _what_ happened. The copy of the 'dataset
On Jun 14, 2013, at 1:25 PM, Bert Gunter wrote:
> For the record:
>
> ...
>
>
>>
>> A bit of commentary: Something did happen. It's just that you didn't do
>> anything with _what_ happened. The copy of the 'dataset'-object got modified
>> but you never returned it from the funct
For the record:
...
>
> A bit of commentary: Something did happen. It's just that you didn't do
> anything with _what_ happened. The copy of the 'dataset'-object got modified
> but you never returned it from the function, and and also didn't reassign it
> to the original 'dataset'
On Jun 14, 2013, at 6:34 AM, Arman Eshaghi wrote:
> Dear all,
>
> I have different data frames for which I would like to modify names of each
> column such that the new name would include the name of the first column
> added to the name of other columns; I came up with the following code.
> Noth
Thanks all!
On Fri, Jun 14, 2013 at 6:40 PM, Rainer Schuermann <
rainer.schuerm...@gmx.net> wrote:
> df1 <- data.frame( A = runif( 10 ), B = runif( 10 ) * 5, C = runif( 10 ) *
> 10, D = runif( 10 ) * 20 )
> df2 <- data.frame( X = runif( 10 ), Y = runif( 10 ) * 5, Z = runif( 10 ) *
> 10 )
> renam
df1 <- data.frame( A = runif( 10 ), B = runif( 10 ) * 5, C = runif( 10 ) * 10,
D = runif( 10 ) * 20 )
df2 <- data.frame( X = runif( 10 ), Y = runif( 10 ) * 5, Z = runif( 10 ) * 10 )
rename_columns <- function( dataset )
{
for( i in 2:ncol( dataset ) )
colnames( dataset )[i]
al Message -----
> From: Arman Eshaghi
> To: r-help@r-project.org
> Cc:
> Sent: Friday, June 14, 2013 9:34 AM
> Subject: [R] rename and concatenate name of columns
>
> Dear all,
>
> I have different data frames for which I would like to modify names of each
> column such
ne 14, 2013 9:34 AM
Subject: [R] rename and concatenate name of columns
Dear all,
I have different data frames for which I would like to modify names of each
column such that the new name would include the name of the first column
added to the name of other columns; I came up with the followi
Dear all,
I have different data frames for which I would like to modify names of each
column such that the new name would include the name of the first column
added to the name of other columns; I came up with the following code.
Nothing changes when I run the following code. I would be grateful i
9 matches
Mail list logo