Package: NCmisc 1.2.0

NCmisc: Miscellaneous Functions for Creating Adaptive Functions and Scripts

A set of handy functions. Includes a versatile one line progress bar, one line function timer with detailed output, time delay function, text histogram, object preview, CRAN package search, simpler package installer, Linux command install check, a flexible Mode function, top function, simulation of correlated data, and more.

Authors:Nicholas Cooper

NCmisc_1.2.0.tar.gz
NCmisc_1.2.0.zip(r-4.5)NCmisc_1.2.0.zip(r-4.4)NCmisc_1.2.0.zip(r-4.3)
NCmisc_1.2.0.tgz(r-4.4-any)NCmisc_1.2.0.tgz(r-4.3-any)
NCmisc_1.2.0.tar.gz(r-4.5-noble)NCmisc_1.2.0.tar.gz(r-4.4-noble)
NCmisc_1.2.0.tgz(r-4.4-emscripten)NCmisc_1.2.0.tgz(r-4.3-emscripten)
NCmisc.pdf |NCmisc.html
NCmisc/json (API)

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

Peer review:

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.91 score 6 packages 151 scripts 3.0k downloads 1 mentions 80 exports 0 dependencies

Last updated 2 years agofrom:cf149ef8aa. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 31 2024
R-4.5-winNOTEOct 31 2024
R-4.5-linuxNOTEOct 31 2024
R-4.4-winNOTEOct 31 2024
R-4.4-macNOTEOct 31 2024
R-4.3-winNOTEOct 31 2024
R-4.3-macNOTEOct 31 2024

Exports:cat.pathcheck.linux.installcomifycomma.listcor.withDimdir.force.slashdisplay.vardivide.top.txtdup.pairsestimate.memoryexists.not.functionextend.pcfakeLinesfile.splitfile.split.windowsforce.percentageforce.scalarget.distinct.colsget.extgetRepositorieshas.methodhead2Headerheadli_numerifyis.chis.col.numericis.missingis.vec.logicalis.vec.numericlist.functions.in.filelist.to.envloess.scatterloop.trackermake.divisormake.top.tabmemory.summaryModemust.use.packagenarmnearest.toNumerifyout.ofp.to.Zpackages.loadedpad.leftpctileppapreviewprvprv.largereplace.missing.dfRfile.indexrmv.extrmv.namesrmv.spcse.nasearch.cransim.corsimple.datespcstandardizeSubstitutesuck.bytessuck.cpusuck.memsuck.num.from.txtsummarise.r.datasetssummary2table2dtextogramtimeittoheadertools_read_repositoriestopUnlistwaitwhich.outlierZ.to.p

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Miscellaneous Functions for Creating Adaptive Functions and ScriptsNCmisc-package NCmisc
Check whether a given system command is installed (e.g, bash)check.linux.install
Function to add commas for large numberscomify
Print out comma separated list of values in X, truncating if many (good for error messages)comma.list
Simulate a correlated variablecor.with
A more general dimension functionDim
Obtain an index of all instances of values with duplicates (ordered)dup.pairs
Estimate the memory required for an object.estimate.memory
Does object exist ignoring functions The exists() function can tell you whether an object exists at all, or whether an object exists with a certain type, but it can be useful to know whether an object exists as genuine data (and not a function) which can be important when a variable or object is accidently or intentionally given the same name as a function. This function usually returns a logical value as to the existence of the object (ignoring functions) but can also be set to return the non-function type if the object exists.exists.not.function
Extend an interval by percentageextend.pc
Create fake text for testing purposesfakeLines
Split a text file into multiple partsfile.split
Force argument to be a percentage with length oneforce.percentage
Force argument to be a numeric type with length oneforce.scalar
Return up to 22 distinct colours.get.distinct.cols
Detect all available R repositories.getRepositories
Determine whether a function can be applied to an S4 class/objecthas.method
Print heading text with a border.Header
A good way to preview large lists.headl
Determine robustly whether a vector contains logical datais.vec.logical
Determine robustly whether a vector contains numeric datais.vec.numeric
Show all functions used in an R script file, by packagelist.functions.in.file
Create variables from a listlist.to.env
Draw a scatterplot with a fit lineloess.scatter
Creates a progess bar within a looploop.tracker
Summary of RAM footprint for all R objects in the current session. Not my function, but taken from an R-Help response by Elizabeth Purdom, at Berkeley. Simply applies the function 'object.size' to the objects in ls(). Also very similar to an example in the 'Help' for the utils::object.size() function.memory.summary
Find the mode of a vector.Mode
Do everything possible to load an R package.must.use.package
Return an object with missing values removed.narm
Select the nearest point in an array to a given valuenearest.to
Convert all possible columns of a data.frame to numericNumerify
Easily display fraction and percentagesout.of
Convert p-values to Z-scoresp.to.Z
Check whether a set of packages has been loadedpackages.loaded
Print a vector with appropriate padding so each has equal char length.pad.left
Find data thresholds corresponding to percentilespctile
Posterior probability of association functionppa
Output variable states within functions during testing/debuggingpreview
Output variable states within functions/loops during testing/debuggingprv
Tidy display function for matrix objectsprv.large
Iterate through numeric columns of a dataframe and replace missing with the meanreplace.missing.df
Create an index file for an R function fileRfile.index
Remove names from a named vector or listrmv.names
Remove leading and trailing spaces (or other character).rmv.spc
Search all CRAN packages for those containing keyword(s).search.cran
Simulate a dataset with correlated measuressim.cor
Simple representation and retrieval of Date/Timesimple.date
Print a character a specified number of times.spc
Convert a numeric vector to Z-scores.standardize
Convert objects as arguments to object namesSubstitute
Summarise the dimensions and type of available R example datasetssummarise.r.datasets
Descriptive summary with SD/SE + improved formattingsummary2
Wrapper for the base table() function that includes zero counts - useful to get consistent dimensions across multiple runs with different responding patterns Forces a 2d table with every possible cell (allow zero counts) Only for tables where there are two vectors entered, while the base function allows for more, or also allows just 1. If the wrong arguments are entered, attempts to pass the input to the base version of 'table' instead.table2d
Make an ascii histogram in the console.textogram
Times an expression, with breakdown of time spent in each function !DEPRECATED October 14, 2022!timeit
Return a string with each first letter of each word in upper case.toheader
Monitor CPU, RAM and Processestop
Unlist a list, starting only from a set depth.Unlist
Wait for a period of time.wait
Return vector indexes of statistical univariate outlierswhich.outlier
Convert Z-scores to p-valuesZ.to.p