JBGruber / rwhatsapp

An R package for working with WhatsApp data 💬
95 stars 19 forks source link

Time Conversion error #10

Closed KeaganStokoe closed 4 years ago

KeaganStokoe commented 4 years ago

"Warning message: In rwa_read(history) : Time conversion did not work correctly. Provide a custom format..."

The abovementioned error message occurs when the script is run and in spite of cloning the Github Repo following the updates for date-time issues.

South African data looks as follows:

[2019/11/21, 13:58:48] Zach Wolpe: thanks for the great info 👏🏻 really helpful 👌🏻 perhaps the downsizing of the research sector is an opportunity as they need to streamline their research budget
[2019/11/21, 13:59:15] Zach Wolpe: if you have some free time we'd love to meet up & get your perspective
[2019/11/21, 14:10:45] Sipho Gwabanda: Definitely, so guys keeping their jobs are having to take on a lot more coverage. Which is a fantastic opportunity for you guys. 

Thanks for the assistance!

JBGruber commented 4 years ago

Thanks for reporting. Another format I haven't come across yet. I was able to fix it quickly though and it should work with the GitHub version of the package now. Just install via:

remotes::install_github("JBGruber/rwhatsapp")

Or use a custom format to make sure it works, even with the CRAN version:

x <- c(
  "[2019/11/21, 13:58:48] Zach Wolpe: thanks for the great info <U+0001F44F><U+0001F3FB> really helpful <U+0001F44C><U+0001F3FB> perhaps the downsizing of the research sector is an opportunity as they need to streamline their research budget",
  "[2019/11/21, 13:59:15] Zach Wolpe: if you have some free time we'd love to meet up & get your perspective",
  "[2019/11/21, 14:10:45] Sipho Gwabanda: Definitely, so guys keeping their jobs are having to take on a lot more coverage. Which is a fantastic opportunity for you guys. "
)

rwhatsapp::rwa_read(x, format = "[yyyy/MM/dd, HH:mm:ss]")
#> # A tibble: 3 x 6
#>   time                author    text                    source  emoji emoji_name
#>   <dttm>              <fct>     <chr>                   <chr>   <lis> <list>    
#> 1 2019-11-21 13:58:48 Zach Wol~ "thanks for the great ~ text i~ <NUL~ <NULL>    
#> 2 2019-11-21 13:59:15 Zach Wol~ "if you have some free~ text i~ <NUL~ <NULL>    
#> 3 2019-11-21 14:10:45 Sipho Gw~ "Definitely, so guys k~ text i~ <NUL~ <NULL>

Created on 2020-01-16 by the reprex package (v0.3.0)

Let me know if you have any more questions.

KeaganStokoe commented 4 years ago

Working perfectly with that fix.

Thanks for the quick response & the great package!