I am using the ABC package in R which computes several statistics that can be plotted. Using
plot( the results as matrix from another function in the package ) or
summary( the results as matrix from another function in the package )
several plots/statistics are displayed.
I am interested to get the maximum value of one of the graphs that is displayed. However, the values of the plotted graphs are not returned or used in the input matrix.
How can I get them, or how can I see what function was applied to construct the graph?
I am using the ABC package in R which computes several statistics that can
Share
Generally, to view the code for S3 methods, you would type the generic method, followed by a dot. followed by the S3 class. For example, to view the code dispatched on a
glmobject by the methodsummary:Same rule applies for the
abcpackage, however it seems that the authors have not exported their methods into the namespace. Thus, you have to specify theabcpackage namespace. Try:for summary(), plot(), hist(), respectively.
As Joshua notes, the str() function is helpful to view how data is stored in an object. For example, after running
example(abc)to generate the examples from theabcvignette, the objectlin2is produced, which is of classabc. Tryingstr(lin2)shows how the data is stored. Then if you wanted to see the adjusted values forlin2, you could trylin2$adj.values.