JBGruber / rwhatsapp

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

rwa_read issue #6

Closed dbnkkk closed 4 years ago

dbnkkk commented 4 years ago

Hi, thanks for the functions, very helpful.

However, rwa_read is not able to read msgs consisting of more than 2 lines. The function just picks up the top 2 lines of the msg. Are there any parameter settings to correct this?

Thanks! Dobrin

JBGruber commented 4 years ago

:open_mouth: no idea how I missed that! But should work now with the dev version:

x <- c(
  "05/11/2019, 08:52 - Johannes Gruber: Is there a problem with this longer messages?",
  "05/11/2019, 08:52 - Johannes Gruber: Let's say this is a long message.", 
  "Which is split over several lines by WhatsApp.", 
  "",
  "And the user also leaves a blank line for the end of a paragraph",
  "Can rwhatsapp still read this?"
)

df <- rwhatsapp::rwa_read(x)
df$text
#> [1] "Is there a problem with this longer messages?"                                                                                                                                      
#> [2] "Let's say this is a long message.\nWhich is split over several lines by WhatsApp.\nAnd the user also leaves a blank line for the end of a paragraph\nCan rwhatsapp still read this?"

Created on 2019-11-28 by the reprex package (v0.3.0)

Thanks for reporting!

dbnkkk commented 4 years ago

thanks vm for sorting it out so quickly!

do i now need to just reinstall the R package to use the amended function? (sry if it is a stupid question)

JBGruber commented 4 years ago

Yes! It should work after you update the package using:

devtools::install_github("JBGruber/rwhatsapp")
dbnkkk commented 4 years ago

thanks Johannes, can confirm works fine here;]

JBGruber commented 4 years ago

Great!