Package: xfun 0.49.5

xfun: Supporting Functions for Packages Maintained by 'Yihui Xie'

Miscellaneous functions commonly used in other packages maintained by 'Yihui Xie'.

Authors:Yihui Xie [aut, cre, cph], Wush Wu [ctb], Daijiang Li [ctb], Xianying Tan [ctb], Salim Brüggemann [ctb], Christophe Dervieux [ctb]

xfun_0.49.5.tar.gz
xfun_0.49.5.zip(r-4.5)xfun_0.49.5.zip(r-4.4)xfun_0.49.5.zip(r-4.3)
xfun_0.49.5.tgz(r-4.4-x86_64)xfun_0.49.5.tgz(r-4.4-arm64)xfun_0.49.5.tgz(r-4.3-x86_64)xfun_0.49.5.tgz(r-4.3-arm64)
xfun_0.49.5.tar.gz(r-4.5-noble)xfun_0.49.5.tar.gz(r-4.4-noble)
xfun_0.49.5.tgz(r-4.4-emscripten)xfun_0.49.5.tgz(r-4.3-emscripten)
xfun.pdf |xfun.html
xfun/json (API)
NEWS

# Install 'xfun' in R:
install.packages('xfun', repos = c('https://yihui.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/yihui/xfun/issues

On CRAN:

17.99 score 142 stars 4.2k packages 780 scripts 1.3M downloads 2 mentions 150 exports 0 dependencies

Last updated 6 hours agofrom:f55495b783. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 21 2024
R-4.5-win-x86_64OKNov 21 2024
R-4.5-linux-x86_64OKNov 21 2024
R-4.4-win-x86_64OKNov 21 2024
R-4.4-mac-x86_64OKNov 21 2024
R-4.4-mac-aarch64OKNov 21 2024
R-4.3-win-x86_64OKNov 21 2024
R-4.3-mac-x86_64OKNov 21 2024
R-4.3-mac-aarch64OKNov 21 2024

Exports:alnum_idappend_uniqueappend_utf8as_strict_listattrbase_pkgsbase64_decodebase64_encodebase64_uribg_processbroken_packagesbump_versioncache_execcache_rdscheck_old_packagecheck_package_namecompare_Rcheckcrandalf_checkcrandalf_resultscsv_optionsdecimal_dotdel_empty_dirdir_createdir_existsdivide_chunkdo_oncedownload_cachedownload_fileembed_dirembed_fileembed_filesenv_optionexisting_filesexit_callfenced_blockfenced_divfile_existsfile_extfile_renamefile_stringfind_globalsfind_localsformat_bytesfrom_rootgithub_apigithub_releasesgrep_subgsub_dirgsub_extgsub_filegsub_fileshtml_escapehtml_taghtml_valuehtml_viewin_dirinstall_dirinstall_githubis_abs_pathis_arm64is_asciiis_blankis_CRAN_incomingis_linuxis_macosis_R_CMD_checkis_rel_pathis_sub_pathis_unixis_web_pathis_windowsisFALSEjoin_wordsjson_vectorlazy_loadlazy_saveloadablemagic_pathmake_fencemark_dirsmd_tablemd5mime_typemsg_catn2wnative_encodenew_appnew_recordnews2mdnormalize_pathnumbers_to_wordsoptipngparse_onlypkg_attachpkg_attach2pkg_availablepkg_bibpkg_loadpkg_load2proc_killprocess_fileproj_rootprose_indexprotect_mathraw_stringRcmdread_allread_binread_utf8recordrecord_printrelative_pathrename_seqrest_apirest_api_rawretryrev_checkroot_rulesRscriptRscript_callrstudio_typesame_pathsans_extsession_infoset_envvarshrink_imagessort_filesplit_linessplit_sourcestr_wrapstrict_liststrip_htmlsubmit_cransystem3tinifytinify_dirtojsontreetry_errortry_silentupload_ftpupload_imgurupload_win_builderurl_accessibleurl_filenamevalid_syntaxwith_extwrite_utf8yaml_bodyyaml_load

Dependencies:

An Introduction to xfun

Rendered fromxfun.Rmdusinglitedown::vignetteon Nov 21 2024.

Last update: 2024-10-02
Started: 2018-06-15

Readme and manuals

Help Manual

Help pageTopics
Generate ID stringsalnum_id
Obtain an attribute of an object without partial matchingattr
Get base R package namesbase_pkgs
Encode/decode data into/from base64 encoding.base64_decode base64_encode
Generate the Data URI for a filebase64_uri
Start a background processbg_process
Find out broken packages and reinstall thembroken_packages
Bump version numbersbump_version
Cache the execution of an expression in memory or on diskcache_exec
Cache the value of an R expression to an RDS filecache_rds
Submit check jobs to crandalfcrandalf_check crandalf_results
Parse comma-separated chunk optionscsv_options
Evaluate an expression after forcing the decimal point to be a dotdecimal_dot
Delete an empty directorydel_empty_dir
Create a directory recursively by defaultdir_create
Test the existence of files and directoriesdir_exists file_exists
Divide chunk options from the code chunk bodydivide_chunk
Perform a task once in an R sessiondo_once
Download a file from a URL and cache it on diskdownload_cache
Try various methods to download a filedownload_file
Embed a file, multiple files, or directory on an HTML pageembed_dir embed_file embed_files
Retrieve a global option from both 'options()' and environment variablesenv_option
Find file paths that existexisting_files
Call 'on.exit()' in a parent functionexit_call
Create a fenced block in Markdownfenced_block fenced_div make_fence
Manipulate filename extensionsfile_ext sans_ext with_ext
Rename files and directoriesfile_rename
Read a text file and concatenate the lines by ''\n''file_string
Find global/local variables in R codefind_globals find_locals
Format numbers of bytes using a specified unitformat_bytes
Get the relative path of a path in a project relative to the current working directoryfrom_root
Get the tags of GitHub releases of a repositorygithub_releases
Perform replacement with 'gsub()' on elements matched from 'grep()'grep_sub
Search and replace strings in filesgsub_dir gsub_ext gsub_file gsub_files
Tools for HTML tagshtml_escape html_tag html_value html_view
Evaluate an expression under a specified working directoryin_dir
Install a source package from a directoryinstall_dir
An alias of 'remotes::install_github()'install_github
Test if paths are relative or absoluteis_abs_path is_rel_path
Check if a character vector consists of entirely ASCII charactersis_ascii
Test if a character vector consists of blank stringsis_blank
Test if a path is a subpath of a diris_sub_path
Test if a path is a web pathis_web_path
Test for types of operating systemsis_arm64 is_linux is_macos is_unix is_windows
Join multiple words into a single stringjoin_words
Save objects to files and lazy-load themlazy_load lazy_save
Find a file or directory under a root directorymagic_path
Mark some paths as directoriesmark_dirs
Generate a simple Markdown pipe tablemd_table
Calculate the MD5 checksums of R objectsmd5
Get the MIME types of filesmime_type
Generate a message with 'cat()'msg_cat
Try to use the system native encoding to represent a character vectornative_encode
Create a local web applicationnew_app
Convert package news to the Markdown formatnews2md
Normalize pathsnormalize_path
Convert numbers to English wordsn2w numbers_to_words
Run OptiPNG on all PNG files under a directoryoptipng
Parse R code and do not keep the sourceparse_only
Attach or load packages, and automatically install missing packages if requestedloadable pkg_attach pkg_attach2 pkg_available pkg_load pkg_load2
Generate BibTeX bibliography databases for R packagespkg_bib
Kill a process and (optionally) all its child processesproc_kill
Read a text file, process the text with a function, and write the text backprocess_file sort_file
Return the (possible) root directory of a projectproj_root root_rules
Find the indices of lines in Markdown that are prose (not code blocks)prose_index
Protect math expressions in pairs of backticks in Markdownprotect_math
Print a character vector in its raw formprint.xfun_raw_string raw_string
Read all text files and concatenate their contentread_all
Read all records of a binary file as a raw vector by defaultread_bin
Read / write files encoded in UTF-8append_unique append_utf8 read_utf8 write_utf8
Run R code and record the resultsformat.xfun_record_results print.xfun_record_results record
Print methods for 'record()'new_record record_print record_print.default record_print.record_asis
Get the relative path of a path relative to a directoryrelative_path
Rename files with a sequential numeric prefixrename_seq
Get data from a REST APIgithub_api rest_api rest_api_raw
Retry calling a function for a number of timesretry
Run 'R CMD check' on the reverse dependencies of a packagecompare_Rcheck rev_check
Run the commands 'Rscript' and 'R CMD'Rcmd Rscript
Call a function in a new R session via 'Rscript()'Rscript_call
Type a character vector into the RStudio source editorrstudio_type
Test if two paths are the same after they are normalizedsame_path
An alternative to sessionInfo() to print session informationsession_info
Set environment variablesset_envvar
Shrink images to a maximum widthshrink_images
Split a character vector by line breakssplit_lines
Split source lines into complete expressionssplit_source
Wrap character vectorsstr_wrap
Strict lists$.xfun_strict_list as_strict_list print.xfun_strict_list strict_list
Strip HTML tagsstrip_html
Submit a source package to CRANsubmit_cran
Run 'system2()' and mark its character output as UTF-8 if appropriatesystem3
Use the Tinify API to compress PNG and JPEG imagestinify tinify_dir
A simple JSON serializerjson_vector tojson
Turn the output of 'str()' into a tree diagramtree
Try an expression and see if it throws an errortry_error
Try to evaluate an expression silentlytry_silent
Upload to an FTP server via 'curl'upload_ftp upload_win_builder
Upload an image to imgur.comupload_imgur
Test if a URL is accessibleurl_accessible
Extract filenames from a URLsurl_filename
Check if the syntax of the code is validvalid_syntax
Partition the YAML metadata and the body in a documentyaml_body
Read YAML datayaml_load