I generate and save a dataset

For example

exampledata<-runif(10)
library("R.utils");
saveObject(exampledata, file="exampledata_9810.RData");

exampledata_9810<- loadObject("exampledata_9810.RData");

I use ex function to make alot of calculations using sink to export results
(in this simply example only summary of dataset)

ex<-function(data){
sink(paste("data",'Example.txt'))
print(summary(data))
}

ex(data=exampledata_9810)


Function ex works fine BUT I don't want the file of results to have the name
"data Example" but
"exampledata_9810 Example"
How can I do this?

Thanks for your help

Evgenia

-- 
View this message in context: 
http://r.789695.n4.nabble.com/Results-with-name-of-dataset-tp2318328p2318328.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to