In last post, we discussed a little bit a bout the R data types, or objective types. Now we need to have a look at what are their attributes?
This is one step toward understanding the object: an operation over objective without understanding its attributes could cause potential catastrophic.
OBJECTIVE ATTRIBUTES
All objects except NULL can have one or more attributes attached to them. Attributes are used to implement the class structure used in R. If an object has a class attribute then that attribute will be examined during evaluation.
$name, $class, $dim, $levels
FUNCTIONS TO UNDERSTAND OBJECTIVE
After the theories, it is better to practice and get really access the data!
1. attributes(objective)
Get an understanding about what attributes are associated with the objective
2. str(objective)
Compactly display the internal structure of an R object
3. class(objective)
Many R objects have a class attribute, a character vector giving the names of the classes from which the object inherits.
4. mode(objective)
Get or set the type or storage mode of an object.
5. summary(objective)
Summary is a generic function used to produce result summaries of the results of various model fitting functions.
No comments:
Post a Comment