Module #7
Definitely been a while since I've seen the object oriented side of any programming language . My first language with C++ and I took that class in 2015. In this module I'll be making my own data and grabbing some data from a previous class.
The first thing I did was load the data from an Excel spreadsheet. It was data on my playlists in Spotify. First I check out the data using the head function and then use the list function they both look the same and then I use the STR function which yielded different results such as giving me more information on the data Types of each column. By using the is S4 function we can determine that the data loaded is not S4.
Then I create S3 data. I do this by using a simple list function. I use the class and attributes too.
Then I create s4 data using the new function but before I use that I must create a class otherwise it will not work… and I did try.
How do you tell what OO system (S3 vs. S4) an object is associated with?
This can usually be determined by using a function such as isS4 ().
How do you determine the base type (like integer or list) of an object?
The base type can usually be determined by the typeof() function.
What is a generic function?
A generic function is an instance of a class that inherits both from the function and standard object.
What are the main differences between S3 and S4?
It appears that S4 is more formal and that S 3 is not . S4 has formal class definitions and describe inheritance forge class and has multiple dispatch.
In your GitHub, create two examples of S3 and S4.
Please see my Github!
Comments
Post a Comment