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

32

Version

0.4.2

License

MIT + file LICENSE

Maintainer

Michael W. Kearney

Last Published

October 16th, 2018

Functions in tfse (0.4.2)

max_na

Filter based on proportion of missing data
nin

Return lhs values not in rhs values
pbcopy

pbcopy
psub

Paste sub
peel_lists

peel lists
pmsg

Paste collapse input and print as message
rename_git_repo

Rename git repo code
rescale

Standard: Rescale values to a standard normal scale
theme_mwk

theme_mwk
tfse

tfse: Various Useful Functions
col2hex

col2hex
menuline

menuline
readlines

readlines
readline_

readline_
na_omit

Omit missing values/rows
set_class

set class
regmatches_

extract reg expr matches
shhh

execute expression quietly
rm_.DS_Store

Remove pesky .DS_Store files
trim_ws

trim_ws
search_files

search_files
show_connections

show connections
substrev

Sub string reverse
match_arg

match arg to choices
gregexpr_

smart gregexpr wrapper
install_if

Install packages if not already
cc

Combine comma separated strings
add_arg_if

Add defaults to argument list
count_na

Count missing values
gg_cols

gg_cols
boxcode

boxcode