quickcode1.0.8 package

Quick and Essential 'R' Tricks for Better Scripts

add.header

Addin snippet function to add header comment to a current opened file

add.sect.comment

Addin snippet function to custom section comment

add.snippet.clear

Snippet R function to clear console and set directory

addkey

Add index keys to a vector or data frame or list or matrix

ai.duplicate

Prompt guided duplication and editing of files

archivedPkg

Listing of all CRAN archived R packages

as.boolean

Convert boolean values between formats

bionic_txt

Generate a bionic text

categorical_to_numeric

Convert Categorical Values to Numeric Improvement to seq_along()

clearenvironment

Clear environment, clear console, set work directory and load files

cols.rep

Replicate Columns in a Data Frame

comments

Extract all comments or functions from a file

compHist

Compare histograms of two distributions

const

Mathematical constants

create_shape

Create geometric shapes with optional text

cybersecurity

Extract all IP addresses from a string

data_pop_filter

Remove elements from a data matching filter

data_pop

Remove last n rows or column or specified elements from a data frame l...

data_push

Add data to another data like array_push in PHP

data_rep

Duplicate a data rows or columns X times

data_shuffle

Shuffle a data frame just like shuffle in PHP

date_tweaks

Combine vector to create Date, or split Date into vector

date-topic

Convert Dates into Numeric Week Counts

descasc

Check is numbers in a vector are decreasing or increasing

detect_outlier2

Advanced Outlier Detection in Numeric Data with Optional Grouping

distribution_check

Check if a data fits the distribution

duplicate

Duplicate a file with global text replacement

empty

Not empty

errorout

Error coalescing operator

fAddDate

Append date to filename

find_packages

Fetch R package based on keyword

from_tensor_slices

Create Tensor-Like Slices from a Data Frame or Matrix

geostats

Calculate geometric coefficient of variation, mean, or SD and round

getDate

Extract all dates from a string

github-tweaks

Fetch GitHub Repository Creation & Last Updated Date

has.error

Check if a call or expression produces errors

header.rmd

Snippet function to add header to a current Rmd opened file

in.range

If number falls within a range of values and get closest values

inc

Increment vector by value

init

Initialize new variables and objects

insertInText

Shiny app function to insert string to current file in RStudio

is.image

Is file name extension(s) an image

lastwd

Go back to previous directory

learn_rate_scheduler

Learning Rate Scheduler

libraryAll

Load specific R libraries and clear environment

list_push

Add elements to a list like array_push in PHP

list_shuffle

Shuffle a list object just like shuffle in PHP

machine_learning

Calculate the distance of points from the center of a cluster

mathmisc

Miscellaneous math computations: Corresponding m-m and quantile for co...

minus

Decrease vector by value

mix.color

Mix or Blend two or more colors

mix.cols.btw

Mix or Blend colors between two or more colors

mode.calc

Calculate the Mode of a Numeric or Character Vector

multihead_att

Multi-Head Attention

mutate_filter

Mutate only a subset of dataset intact

na.cumsum

Cumulative Sum with NA Removal

ndecimal

Count the number of decimal places

newSuperVar

Create and use a super variable with unique capabilities

nin

Not in vector or array

normalize.vector

Normalize a Numeric Vector to the Range [0, 1]

not.data

Not a data

not.duplicated

Not duplicated elements

not.environment

Not an environment

not.exists

Not exists

not.image

File name extension(s) is Not an image

not.inherits

Not inherit from any of the classes specified

not.integer

Not an integer

not.logical

Not logical

not.na

Not NA

not.null

Not NULL

not.numeric

Not numeric

not.vector

Not a vector

number

Generate a random number (integer)

orsign

Nullish coalescing operator

outlierdetect1

Detect Outliers in a Numeric Vector

percentmatch1

Function to calculate the percentage of matching between two strings

plus

Increment vector by value

randString

Generate a random string

rcolorconst

R Color Constant

rDecomPkg

Check whether an R package has been decommissioned in CRAN

read.csv.print

Read a CSV and preview first X rows and columns

read.table.print

Read in a table and show first X rows and columns

refresh

Clear environment, clear console, set work directory and load files

rows.rep

Replicate Rows in a Data Frame

sample_by_column

Re-sample a dataset by column and return number of entry needed

setOnce

Set a variable only once

simplechaining

simple function chaining routine

simplechaining2

Combine specific functions as store as one function

sort-additives

Sort vector by length or file types of its content

strsplit.bool

Split a string of values and return as boolean vector

strsplit.num

Split a string of numbers and return as numeric vector

sub.range

Calculate the Range Difference of a Numeric Vector

summarize.envobj

Get all the environment objects and their sizes

switch_cols

Switch the index of two columns in a data set

switch_rows

Switch the index of two rows in a data set

track_func

Track Function Usage and Performance

trim.file

Remove Empty Lines from a File

unique_len

Combine unique() and length()

vector_pop

Remove last n elements or specified elements from a vector like array_...

vector_push

Add elements to a vector like array_push in PHP

vector_shuffle

Shuffle a vector just like shuffle in PHP

yesNoBool

Convert Yes/No to Binary or Logical

zscore

Calculates Z-Scores of a distribution

The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to improve your scripts. Improve the quality and reproducibility of 'R' scripts.

  • Maintainer: Obinna Obianom
  • License: MIT + file LICENSE
  • Last published: 2025-05-15