Installed "RedditExtractoR"library - Get an Error message - cannot find could not find function "get_reddit"

install.packages("RedditExtractoR")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

Installing package into ‘C:/Users/sydau/AppData/Local/R/win-library/4.5’
(as ‘lib’ is unspecified)
also installing the dependency ‘RJSONIO’
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.5/RJSONIO_2.0.0.zip'
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.5/RedditExtractoR_3.0.9.zip'
package ‘RJSONIO’ successfully unpacked and MD5 sums checked
package ‘RedditExtractoR’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\sydau\AppData\Local\Temp\RtmpyE3IhK\downloaded_packages

library (RedditExtractoR

  •      )
    

reddit_data <- get_reddit(subreddit = "science",

  •                       sort_by = "hot", 
    
  •                       cn_threshold = 10)
    

Error in get_reddit(subreddit = "science", sort_by = "hot", cn_threshold = 10) :
could not find function "get_reddit"

library(RedditExtractoR)

Example: get top posts from r/science

reddit_data <- get_reddit(subreddit = "science",

  •                       sort_by = "hot", 
    
  •                       cn_threshold = 10)
    

Error in get_reddit(subreddit = "science", sort_by = "hot", cn_threshold = 10) :
could not find function "get_reddit"

library(RedditExtractoR)

Example: get top posts from r/science

reddit_data <- get_reddit(subreddit = "science",

  •                       sort_by = "hot", 
    
  •                       cn_threshold = 10)
    

Error in get_reddit(subreddit = "science", sort_by = "hot", cn_threshold = 10) :
could not find function "get_reddit"

I'm afraid there is no get_reddit() function in current {RedditExtractoR} v3 -

What's the source of that code (i.e. an older study, a guide or forum / blog post, ... LLM)? If you do need to replicate it as-is and with no or minimal changes, you also need earlier v2 of the package - GitHub - ivan-rivera/RedditExtractor: A minimalistic R wrapper for the Reddit API

Installing through pak::pak("RedditExtractoR@2.1.5") also works, tested with R 4.5.1 on Windows. You also need to have RTools installed to build it.