sarah
March 15, 2018, 2:39pm
1
I'm getting up and running with the googledrive package and wondering if there are any good resources/writeups out there beyond the package documentation and the googledrive.tidyverse.org site.
In particular I'm having trouble figuring out how to get the last modified date for a file - it doesn't seem to be one of the options for drive_reveal().
mara
March 15, 2018, 2:43pm
2
sarah
March 15, 2018, 2:54pm
3
Ah, yes, and then it's somewhere in that list that is the third column of the dribble. Thanks!
1 Like
You can dig it -- and much more -- out of the drive_resource
list-column.
This should get you started:
library(tidyverse)
x <- googledrive::drive_find(n_max = 3)
x %>%
mutate(modified = map_chr(drive_resource, "modifiedTime"))
#> # A tibble: 3 x 4
#> name id drive_resource modified
#> * <chr> <chr> <list> <chr>
#> 1 googlesheets4-design-exploration 1xTUxWGcFLtD… <list [32]> 2018-03-1…
#> 2 Internship Application 1ZioYgbU1bzS… <list [30]> 2018-03-1…
#> 3 2018 Webinars 1WIf9VqQdGsB… <list [32]> 2018-03-1…
Created on 2018-03-15 by the reprex package (v0.2.0).
1 Like
sarah
March 15, 2018, 9:30pm
5
Yes, there's a lot in there - I had just breezed past that list column. Thanks!
mara
March 16, 2018, 11:31am
6
Hey @sarah ,
When you get a chance, would you mind marking the answer to your question? The how-to for that is here:
If your question has been answered don't forget to mark the solution
Folks in the future can come along and easily see what worked for you.
You acknowledge the person who solved the issue.
If you're the original poster and the category allows solutions to be marked there should be a little box at the bottom of replies that you can click to select that response as your "solution."
Before:
[image]
After:
[image]
Based on replies by @mara
1 Like
sarah
March 16, 2018, 2:24pm
7
Huh, you can only pick one? Both were very helpful...
mara
March 16, 2018, 5:56pm
8
Oh, don't worry about that! It's just much easier if you can see that questions have been solved with that little check box!