Learn R Programming

Nmisc

Contains functions useful for debugging, set operations on vectors, and 'UTC' date and time functionality. It adds a few vector manipulation verbs to 'purrr' and 'dplyr' packages. It can also generate an R file to install and update packages to simplify deployment into production. The functions were developed at the data science firm 'Numeract LLC' and are used in several packages and projects.

Installation

From CRAN

install.packages("Nmisc")

From GitHub

# install.packages("devtools")
devtools::install_github("numeract/Nmisc")

Please note that the GitHub version requires GitHub versions of glue and tidyselect

Functions

The package is still in development, functions will be updated.

  • related to base package
    • catn, str1, str2, clear_warnings
    • keep_if_in / %if_in%, keep_if_not_in / %if_not_in%
    • seq_ncol, seq_nrow
    • setequal_na
  • date & time:
    • is.POSIXct, format_utc, now_utc
  • os:
    • get_os
  • extending purrr:
    • keep_at and discard_at
  • extending dplyr:
    • pull_with_names
  • package related:
    • get_packages and generate_install_file

Copy Link

Version

Install

install.packages('Nmisc')

Monthly Downloads

168

Version

0.3.7

License

MIT + file LICENCE

Issues

Pull Requests

Stars

Forks

Maintainer

Mike Badescu

Last Published

April 28th, 2021

Functions in Nmisc (0.3.7)

catn

Concatenate with new line
str1

High level overview of the structure of an R object
keep_if_in

Keep elements present in x and not contained in y
clear_warnings

Avoid repeated warnings
keep_if_not_in

Discard elements present in x and not contained in y
format_utc

Format Date and POSIXct
keep_at

Keep or discard elements
pull_with_names

Pull out a single column
now_utc

Current time in UTC time zone
get_packages

Get information about the package used in the project
is.POSIXct

Is it a POSIXct object?
seq_nrow

Creates a sequence based on the number of rows or columns
get_os

Returns the name of the Operating System
generate_install_file

Generates an R file to install packages used by the project.
setequal_na

Check if two vectors have the same elements