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",sep="")
  mz_int<-merge(mz,Dg_a,by=c("asbhh","bpkzm"),all.x=T)
  colnames(Dg_a)[colnames(Dg_a)=="bpkzm"]<-"bpkzv"

colnames(Dg_a)[colnames(Dg_a)==paste(Var,"_m",sep="")]<-paste(Var,"_v",sep="")
  mz_int<-merge(mz_int,Dg_a,by=c("asbhh","bpkzv"),all.x=T)
  mz_int <-
mz_int[order(mz_int$asbhh,mz_int$apkz),c(colnames(mz),paste(Var,"_m",sep=""),paste(Var,"_v",sep=""))]
 }

My problem is that the objects are not saved in the workspace. Especially I
need the object which I created in the end - mz_int - because I want to do
calculations with it in R afterwards.

Thank you very much for your help in advance.

Marion

	[[alternative HTML version deleted]]

