Executing library(lubridate) is returning nothing

Hi there!

I am extremely new to RStudio and R in general. I've been following along with the Google Data Analytics course and it has guided us to install tidyverse in RStudio, load it using library(tidyverse) and also load the lubridate package with library(lubridate).

Executing library(tidyverse) worked but when I go and try to do library(lubridate), nothing happens. Not even an error message. Does anyone know what this is about?

Appreciate the help! :smile:

1 Like

First, the tidyverse package includes lubridate, so there is no need to load lubridate separately. Second, the library() function normally doesn't return any output. If you don't get an error, you're fine.
You can use the search() function to see what packages you have loaded. Here are the results of that before and after loading tidyverse. Notice lubridate is listed.

search()
 [1] ".GlobalEnv"        "tools:rstudio"     "package:stats"    
 [4] "package:graphics"  "package:grDevices" "package:utils"    
 [7] "package:datasets"  "package:methods"   "Autoloads"        
[10] "package:base"     
> library(tidyverse)
── Attaching core tidyverse packages ────────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.2     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.2     ✔ tibble    3.2.1
✔ lubridate 1.9.2     ✔ tidyr     1.3.0
✔ purrr     1.0.1     
── Conflicts ──────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package to force all conflicts to become errors
> search()
 [1] ".GlobalEnv"        "package:lubridate" "package:forcats"  
 [4] "package:stringr"   "package:dplyr"     "package:purrr"    
 [7] "package:readr"     "package:tidyr"     "package:tibble"   
[10] "package:ggplot2"   "package:tidyverse" "tools:rstudio"    
[13] "package:stats"     "package:graphics"  "package:grDevices"
[16] "package:utils"     "package:datasets"  "package:methods"  
[19] "Autoloads"         "package:base"   
2 Likes

Thank you so much!! The screenshot they provided wasn't matching up with what showed up for me. But now I realize that their material is probably a bit dated...I used the search function and looks like we are good.

Thank you again!

FYI, Lubridate has been loaded with the tidyverse since version 2.0.0

tidyverse 2.0.0

1 Like

Thanks for the info! When I checked the screenshot they provided, it was tidyverse ver. 1.3.1, so it's all coming together now lol.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.