My code is the next:

And I send to a images of what it prints in the console and in the viewer of RStudio
My code is the next:

And I send to a images of what it prints in the console and in the viewer of RStudio