[R] Saving with tkgetSaveFile

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Mon Sep 22 18:42:00 CEST 2003


Thomas W Blackwell <tblackw at umich.edu> writes:

> Ruben  -
> 
> Why not simply   save(x, file="new.file.name")  ?
> 
> See  help("save"), help("files").  The file name must be
> quoted, and it must be passed as a named argument to save().

That's not the issue. tclvalue(a) instead of as.character(a) should be
the solution if there are spaces in the filename. Tcl internals are to
blame... 

        -p

> -  tom blackwell  -  u michigan medical school  -  ann arbor  -
> 
> On Fri, 19 Sep 2003 solares at unsl.edu.ar wrote:
> 
> > HI, i'm trying to save a data frame with the next script:
> > x<-c(1,2,3)#suposse here the data frame
> > a<-tkgetSaveFile()
> > a<-tkgetSaveFile()
> > save(x,file=as.character(a))
> >
> > but i obtain the next warning message:
> > Warning messages:
> > 1: the condition has length > 1 and only the first element will be used in:
> > if (file == "") stop("`file' must be non-empty string")
> > 2: only first element of `description' argument used
> >
> > and nothing file is saved, ¿What is the error? Thanks Ruben
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list