Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

plain_tweets returns the same text #300

Closed
cecilesauder opened this issue Nov 16, 2018 · 3 comments
Closed

plain_tweets returns the same text #300

cecilesauder opened this issue Nov 16, 2018 · 3 comments

Comments

@cecilesauder
Copy link

cecilesauder commented Nov 16, 2018

Problem

The plain_tweets() returns the same text without cleaning up

Expected behavior

Returning data reformatted with ascii encoding and normal ampersands and without URL links, line breaks, fancy spaces/tabs, fancy apostrophes... 😺

Reproduce the problem

rtweet::plain_tweets("Test @blablabla Don't Remove #What He Has to")
#> [1] "Test @blablabla Don't Remove #What He Has to"

Created on 2018-11-16 by the reprex package (v0.2.1)

rtweet version

‘0.6.8.9000’

## copy/paste output
packageVersion("rtweet")

Session info

## copy/paste output
sessionInfo()

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] reprex_0.2.1 rtweet_0.6.8.9000

loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 pillar_1.3.0 compiler_3.5.1 later_0.7.5 prettyunits_1.0.2
[6] base64enc_0.1-3 tools_3.5.1 progress_1.2.0 digest_0.6.18 jsonlite_1.5
[11] evaluate_0.12 tibble_1.4.2 pkgconfig_2.0.2 rlang_0.3.0.1 cli_1.0.1
[16] rstudioapi_0.8 curl_3.2 yaml_2.2.0 httr_1.3.1 knitr_1.20
[21] fs_1.2.6 hms_0.4.2 rprojroot_1.3-2 R6_2.3.0 processx_3.2.0
[26] fansi_0.4.0 rmarkdown_1.10 callr_3.0.0 clipr_0.4.1 magrittr_1.5
[31] whisker_0.3-2 backports_1.1.2 promises_1.0.1 ps_1.2.1 htmltools_0.3.6
[36] assertthat_0.2.0 httpuv_1.4.5 utf8_1.1.4 openssl_1.0.2 crayon_1.3.4

Token

## copy/paste output
rtweet::get_token()
request: https://api.twitter.com/oauth/request_token authorize: https://api.twitter.com/oauth/authenticate access: https://api.twitter.com/oauth/access_token rstats2twitter key: 6j7Ig4xzHlBr8uUJ5A4Ym0NTf secret: oauth_token, oauth_token_secret, user_id, screen_name ---
@cecilesauder cecilesauder changed the title plain_tweets return the same text plain_tweets returns the same text Nov 16, 2018
@llrs llrs mentioned this issue Feb 15, 2021
@llrs
Copy link
Collaborator

llrs commented Feb 15, 2021

The function doesn't seem to be much documented it removes links, line breeaks, "fancy spaces", "fancy apostrophes" ampersand and removes any non ASCII code. The example doesn't have anything of this.
Try the following rtweet::plain_tweets("Maëlle\nCalçot’s\thouse")

@hadley
Copy link
Collaborator

hadley commented Feb 27, 2021

I think we should probably deprecate this function rather than documenting it further.

@llrs
Copy link
Collaborator

llrs commented Feb 27, 2021

Yeah, there might be better tools for processing texts.

@llrs llrs closed this as completed in 8cc7206 Mar 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants