[R] returning a modified fix()-ed dataframe

2005-10-07 Thread Adrian DUSA
Dear all, In order to ease the transition from SPSS to R for some of my colleagues, I am trying to create a function which would show the variables and their labels (if those exist), using function label in package Hmisc. A toy example would be this: my.data - data.frame(age=c(24,35,28),

Re: [R] returning a modified fix()-ed dataframe

2005-10-07 Thread Sundar Dorai-Raj
Adrian DUSA wrote: Dear all, In order to ease the transition from SPSS to R for some of my colleagues, I am trying to create a function which would show the variables and their labels (if those exist), using function label in package Hmisc. A toy example would be this: my.data -

Re: [R] returning a modified fix()-ed dataframe

2005-10-07 Thread Adrian DUSA
On Friday 07 October 2005 20:55, Sundar Dorai-Raj wrote: Adrian DUSA wrote: [...snip...] Hi, Adrian, You need to assign fix(dataf) to something: my.data - data.frame(age=c(24,35,28), gender=c(Male, Female, Male)) require(Hmisc) label(my.data$age) - Respondent's age

Re: [R] returning a modified fix()-ed dataframe

2005-10-07 Thread Sundar Dorai-Raj
Adrian DUSA wrote: On Friday 07 October 2005 20:55, Sundar Dorai-Raj wrote: Adrian DUSA wrote: [...snip...] Hi, Adrian, You need to assign fix(dataf) to something: my.data - data.frame(age=c(24,35,28), gender=c(Male, Female, Male)) require(Hmisc) label(my.data$age) - Respondent's age

Re: [R] returning a modified fix()-ed dataframe

2005-10-07 Thread Adrian DUSA
On Friday 07 October 2005 21:22, Sundar Dorai-Raj wrote: [...snip...] My guess is you want to have your function fix my.data without having to reassign it. The answer to that question is most likely a road you do not want to travel. Otherwise, try searching the archives for assign reference