Hello everyone,

How does one write a function to return the name of an input object (that is
assumed to be a data frame) as a character string? I tired using the get(),
but this does not work as I had hoped. For example:

myfn<-function(x){

output<-data.frame(Attribute="Data Set Name",Value=as.character(get(x)))

print(output)

}

Thank you!

Dan

        [[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