I created a program that breaks a database in several other banks. But in
this program I save this several banks in txt so now I'd like save in xls,
but I don't know how.

I tried for (nm in Nms) write.table(Res[[nm]], paste(nm, 'xls', sep='.'),
sep="\t",dec=",",col.names=TRUE, row.names=FALSE, quote=TRUE, na="NA")

but it did not work

decup <- function(dados,var){

require(gdata)

dados <- read.xls("dados.xls")

attach(dados)

Res = split(dados, var)

for (nm in Nms) write.table(Res[[nm]], file=paste(nm, 'txt', sep='.'))

for (nm in Nms) zip(paste(nm,'zip',sep='.'),paste(nm,'xls',sep='.'), zip =
Sys.getenv("R_ZIPCMD", "zip"))

}


-- 
Sérgio Henrique Almeida da Silva Junior
Doutorando em Epidemiologia em Saúde Pública
Escola Nacional de Saúde Pública Sérgio Arouca - ENSP/FIOCRUZ
http://lattes.cnpq.br/1611345552843383
Tel: (21) 68463637
http://www.linkedin.com/profile/view?id=250437145&trk=tab_pro

	[[alternative HTML version deleted]]

