Hello Rolf,
thank you for your advice!
Though, I find there is no need to get personal about my stage of
devolopment in R.
Cheers,
Marion
2012/2/15 Rolf Turner
> On 16/02/12 03:59, Marion Wenty wrote:
>
>
>
> Thank you for your answers!
>>
>> Jeff, thanks very much for the tip with the<<-
On 16/02/12 03:59, Marion Wenty wrote:
Thank you for your answers!
Jeff, thanks very much for the tip with the<<- instead of using<- to save
the objects outside of the function, as well! I find this very usefull and
convenient, also if I decide to choose more objects.
This practice is to be
s_elternmz <- function(Var="balt")
{
Dg_a<-mz[,c("asbhh","apkz",Var)]
colnames(Dg_a)[colnames(Dg_a)=="apkz"]<-"bpkzm"
colnames(Dg_a)[colnames(Dg_a)==Var]<-paste(Var,"_m",sep="")
mz_int<-merge(mz,Dg_a,by=c("asbhh","bpkzm"),all.x=T)
colnames(Dg_a)[colnames(Dg_a)=="bpkzm"]<-"bpkzv"
colnames
On Feb 14, 2012, at 10:59 AM, Marion Wenty wrote:
Thank you very much for your help, David!
Now I have got an object which I can work with.
You mentioned that I took two steps to create the new column names.
I had tried doing it in one step but couldn't find out how. Could
you help me with
It is possible to do what you ask using <<- instead of <-, but from the
perspective of using the function it will be much clearer if you add mz as an
argument to the function along with Var, and return mz_int at the end. (The
easiest way to return a variable is to type it alone on the last line
Thank you very much for your help, David!
Now I have got an object which I can work with.
You mentioned that I took two steps to create the new column names.
I had tried doing it in one step but couldn't find out how. Could you help
me with that, as well?
Thank you very much!
Marion
2012/2/14
On Feb 14, 2012, at 9:20 AM, Marion Wenty wrote:
Dear R-helpers,
I created an own function which looks like this
s_elternmz <- function(Var="balt")
{
Dg_a<-mz[,c("asbhh","apkz",Var)]
colnames(Dg_a)[colnames(Dg_a)=="apkz"]<-"bpkzm"
colnames(Dg_a)[colnames(Dg_a)==Var]<-paste(Var,"_m",
7 matches
Mail list logo