Question: write R code without using libraries Project s description This project is about analyzing a function definition. More precisely, it is about taking a function

write R code without using libraries
Projects description
This project is about analyzing a function definition. More precisely, it is about taking a functions definition and returning a data frame with two columns. The first one contains all symbols used in the functions definition, and the second one has either the environments name containing the definition of the symbol or a description of the symbols type, e.g., locally defined, given as argument, etc.
Technically, you must define a function listSymbols(), taking a single argument f and returning a data frame. It is assumed that the function f is a closure (not a builtin, as those are compiled functions and we cannot see their code from the level of pure R language). The following examples present the particular functionalities of the required function.
listSymbols(f = plot.default)
symbol definition
1! base
2... arg
3[ base
4{ base
5<- base
6 $ base
7 ann arg
8 asp arg
9 axes arg
10 Axis graphics
11 box graphics
12 deparse1 base
13 dev.flush imports:graphics
14 dev.hold imports:graphics
15 frame.plot arg
16 function base
17 if base
18 invisible base
19 is.finite base
20 is.null base
21 localAxis locally defined
22 localBox locally defined
23 localTitle locally defined
24 localWindow locally defined
25 log base
26 main arg
27 missing base
28 on.exit base
29 panel.first arg
30 panel.last arg
31 plot.new graphics
32 plot.window graphics
33 plot.xy graphics
34 range base
35 sub base
36 substitute base
37 title graphics
38 type arg
39 x arg
40 xgap.axis arg

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!