Hi all,

 

I've done a simple function for import files but can't do the same think
for export files.

Could you help me solve it?

Thanks in advance for your cooperation.

 

 wd<-"C:\\Teste"    

 

import<-function(wd0){

        wd1<-paste(wd,wd0,"Input\\.", sep = "\\")

            d<-read.table(choose.files(default = wd1, caption =
"Escolher o Ficheiro de Input - *.txt ", multi = FALSE),
head=T,sep="\t",dec=".")

            return(d)}

 

reg<-"Region1"

import(reg)

 

reg<-"Region2"

import(reg)

 

 

export<-function(wd0,var1,trim){

        wd1<-paste(wd,wd0,trim,"Output\\.", sep = "\\")

            d<-
write.table(var1,"C:/Teste/Region/Trim/Output/var1.txt",sep="\t",dec="."
,row.names=F)  

            return(d)}

 

reg<-"Region1"

export(reg,Apur,1t05)

export(reg,Apur,2t05)

 

 

Atenciosamente

Ana Patricia Martins

-------------------------------------------

Serviço Métodos Estatísticos

Departamento de Metodologia Estatística

Telef:  218 426 100 - Ext: 3210

E-mail:  <mailto:ana.pmartins@ine.pt> ana.pmartins@ine.pt

 


	[[alternative HTML version deleted]]


