1

What does ::Page{} do in R/RStudio ?

I'm studying Data Science through IBM certification course in coursera and the notes contain this line of code in all the code blocks and no explanation to what the "Page" function is doing

#load ggplot package

library(ggplot2)

::page{title="create a scatterplot of displacement (disp) and miles per gallon (mpg)"}

ggplot(aes(x=disp,y=mpg,),data=mtcars)+geom_point()

enter image description here

I tried googling but found no help, there was something similar "page()" instead of "Page{}" as in my notes, but that was something completely different.

Limey
  • 10,234
  • 2
  • 12
  • 32
  • 2
    That looks like a mistake in their code. They probably have some sort of custom markup to make their lessons. The `::` operator is usually just for extracting symbols from namespaces. That is certainly not part of the `ggplot2` library. Maybe report the problem to the course authors. – MrFlick May 19 '23 at 14:08
  • 1
    First things first: does the code run, or does it fail in the environment that Coursera has specified? But in any case, the use of "{" should be an error. Possibly `bslib::page` is what they intended? – Carl Witthoft May 19 '23 at 14:49
  • ig it was just a code mistake on the author side, cuz if i run without those colons it runs fine as intended – Simon Nadar May 27 '23 at 07:41

1 Answers1

0

Ig it was just a code mistake on the author side, cuz if I run without those colons it runs fine as intended.