Dear R-users,

I'm writing a program that constructs a dataset. I wish to save the dataset
to a file.

Here's a very simple example of what I'm trying to do

function(x=peter){
y <- x/2
write.csv(y, file = "...\x")
}

The problem is that I want to name the dataset as whatever the name of the
input is. In this case peter.
How do I do this?

Thank you in advance.

Kristian

        [[alternative HTML version deleted]]

______________________________________________
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