[R] How to Read source code of function as string vector or matrix

Thomas Petzoldt thpe at simecol.de
Thu Jul 12 11:12:39 CEST 2012


On 7/12/2012 11:00 AM, purushothaman wrote:
> Hi,
>
> I need to read source code of function as a string vector or matrix.
>
> if i am using get  method it return as closure type.
>
> example
>
> readcsv<-function(filepath)
> {
> output<-read.csv(filepath)
> }
>
> how to get as string vector like this
> test[1]=readcsv<-function(filepath)
> test[2]={
> test[3]=output<-read.csv(filepath)
> test[4]=}
>
> Thanks
> B.Purushothaman

?readLines

Thomas



More information about the R-help mailing list