Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 202

6.3.2 Using S4 Objects

Оглавление

Now, we have two S4 objects and we can use them in our code as necessary. For example, we can change the phone number.

# Check if it is really an S4 object: isS4(my_cust_bank) ## [1] TRUE # Change the phone number and check: my_cust_bank@phone = 987654321 # change the phone number print(my_cust_bank@phone) # check if it changed ## [1] 987654321

The Big R-Book

Подняться наверх