Learn R Programming

⚠️There's a newer version (0.5.0) of this package.Take me there.

tfse

Various useful functions for working with data and writing functions

Install

To install the package

## install from github
remotes::install_github("mkearney/tfse")

Usage

Load the package and go

## load pkg
library(tfse)

## use functions like col2hex
col2hex("greenyellow")
#> [1] "#ADFF2F"

## rescale values
x <- sample(-10:100, 20)

## rescale standard
rescale_standard(x)
#>  [1] 0.110092 0.623853 0.605505 0.614679 0.844037 0.981651 0.000000
#>  [8] 0.220183 1.000000 0.477064 0.642202 0.495413 0.247706 0.825688
#> [15] 0.256881 0.733945 0.899083 0.229358 0.155963 0.192661

## rescale standard
rescale_pointscale(x, 1, 10)
#>  [1]  1.99083  6.61468  6.44954  6.53211  8.59633  9.83486  1.00000
#>  [8]  2.98165 10.00000  5.29358  6.77982  5.45872  3.22936  8.43119
#> [15]  3.31193  7.60550  9.09174  3.06422  2.40367  2.73394

Help

View the help documentation

## view R help documentatoin
help(package = "tfse")

about tfse

  • This is my personal R package of utility functions
  • Why tfse? The acronym was creatively reconfigured from its originally intended state

Copy Link

Version

Install

install.packages('tfse')

Monthly Downloads

27

Version

0.4.4

License

MIT + file LICENSE

Maintainer

Michael W. Kearney

Last Published

November 28th, 2018

Functions in tfse (0.4.4)

cc

Combine comma separated strings
emj

Emojis for creating print messages
gregexpr_

smart gregexpr wrapper
data_set

Create data set
print_complete

Print message about completing a task
add_arg_if

Add defaults to argument list
install_if

Install packages if not already
rename_git_repo

Rename git repo code
gg_cols

gg_cols
github_raw

Generate link to raw Github file
menuline

menuline
match_arg

match arg to choices
n_uq

Number of unique elements
readlines

readlines
max_na

Filter based on proportion of missing data
print_start

Print message about starting a task
pmsg

Paste collapse input and print as message
search_function

search functions
boxcode

boxcode
set_class

set class
regmatches_

extract reg expr matches
print_as_col

Print data frame as a single column
rescale

Standard: Rescale values to a standard normal scale
shhh

execute expression quietly
rm_.DS_Store

Remove pesky .DS_Store files
peel_lists

peel lists
pbcopy

pbcopy
psub

Paste sub
un_zip

Unzip files into directory
show_connections

show connections
search_files

search_files
readline_

readline_
theme_mwk

theme_mwk
trim_ws

trim_ws
substrev

Sub string reverse
tfse

tfse: Various Useful Functions
col2hex

col2hex
count_na

Count missing values
na_omit

Omit missing values/rows
nin

Return lhs values not in rhs values
desc_get_var

Description variables