Title: | Shinya Uryu's Personal R Packages |
---|---|
Description: | More about what it does (maybe more than one line) Use four spaces when indenting paragraphs within the Description. |
Authors: | Shinya Uryu [aut, cre] |
Maintainer: | Shinya Uryu <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-10-31 05:52:42 UTC |
Source: | https://github.com/uribo/suryulib |
Convert notion url to app link
convert_notionapp_link(url)
convert_notionapp_link(url)
url |
url (character) |
## Not run: convert_notionapp_link("https://www.notion.so/728460a1ba514e6c9a3cfde8a8c371a5") ## End(Not run)
## Not run: convert_notionapp_link("https://www.notion.so/728460a1ba514e6c9a3cfde8a8c371a5") ## End(Not run)
Get the latest since_id of tweets for a query in a file
detect_tweet_latest_since_id(dir, query)
detect_tweet_latest_since_id(dir, query)
dir |
A character string indicating the directory path where tweet data is stored. |
query |
A character string indicating the query used to search for tweets. |
A tibble with two columns, "since_id" and "file". "since_id" column contains the latest since_id for the query, and "file" column contains the name of the file that contains the tweet data.
## Not run: detect_tweet_latest_since_id("data-raw", "rstats") ## End(Not run)
## Not run: detect_tweet_latest_since_id("data-raw", "rstats") ## End(Not run)
Request to openBD API
get_openbd(isbn)
get_openbd(isbn)
isbn |
isbn code |
## Not run: get_openbd("9784478108536") ## End(Not run)
## Not run: get_openbd("9784478108536") ## End(Not run)
html showing the reading of the word
html_yomi(x, yomi, style = "space")
html_yomi(x, yomi, style = "space")
x |
word |
yomi |
character |
style |
style for yomi text |
html_yomi("CRAN", "The Comprehensive R Archive Network", "parenthesis")
html_yomi("CRAN", "The Comprehensive R Archive Network", "parenthesis")
Ruby in html
kanji_ruby(x, view = FALSE)
kanji_ruby(x, view = FALSE)
x |
word |
view |
View html output in the viewer |
kanji_ruby("\u8af8\u884c\u7121\u5e38")
kanji_ruby("\u8af8\u884c\u7121\u5e38")
Line Notification
line_notify(token, message, img_file = NULL, .disabled = FALSE)
line_notify(token, message, img_file = NULL, .disabled = FALSE)
token |
Personal access token |
message |
text |
img_file |
path to upload image file |
.disabled |
option |
Color scale for data science plot
scale_color_ds( palette = "main", discrete = TRUE, reverse = FALSE, na.value = "gray60", ... ) scale_fill_ds( palette = "main", discrete = TRUE, reverse = FALSE, na.value = "gray60", ... )
scale_color_ds( palette = "main", discrete = TRUE, reverse = FALSE, na.value = "gray60", ... ) scale_fill_ds( palette = "main", discrete = TRUE, reverse = FALSE, na.value = "gray60", ... )
palette |
main |
discrete |
discrete variables |
reverse |
color order |
na.value |
na color |
... |
path to other functions |
Alternative broom::tidy() for data.frame.
summary_df(data, .trim = NULL, na.rm = TRUE)
summary_df(data, .trim = NULL, na.rm = TRUE)
data |
data.frame |
.trim |
Option. |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
Theme of data science for dark mode
theme_ds_dark(base_size = 11, ...)
theme_ds_dark(base_size = 11, ...)
base_size |
base font size |
... |
Other arguments passed to [theme_light][ggplot2::theme_light] |
Search recent tweets and save to RDS
write_search_tweets_rds(dir, query, since_id, ...)
write_search_tweets_rds(dir, query, since_id, ...)
dir |
A character string indicating the directory path where tweet data is stored. |
query |
A character string indicating the query used to search for tweets. |
since_id |
A character string. This argument is used to retrieve only tweets that have been posted after a specific tweet. If 'since_id' is 'NA', it is set to 'NULL'. |
... |
Additional arguments to be passed to the 'write_search_tweets_rds' function. |
## Not run: write_search_tweets_rds("data-raw", "rstats", since_id = "1621390633146667008") ## End(Not run)
## Not run: write_search_tweets_rds("data-raw", "rstats", since_id = "1621390633146667008") ## End(Not run)
This function retrieves the latest 'since_id' for each query and writes the results to a CSV file.
write_twitter_query_status(dir, query)
write_twitter_query_status(dir, query)
dir |
A character string indicating the directory path where tweet data is stored. |
query |
A character string indicating the query used to search for tweets. |
## Not run: write_twitter_query_status("data-raw", c("#rstats", "#datascience")) ## End(Not run)
## Not run: write_twitter_query_status("data-raw", c("#rstats", "#datascience")) ## End(Not run)