Learn R Programming

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

Kmisc (version 0.1.0)

Miscellaneous functions to improve R coding experience

Description

A collection of functions that improve both R coding experience. Includes utility functions for common data reshaping operations, as well as functions for efficient table and plot generation in R Markdown documents.

Copy Link

Version

Install

install.packages('Kmisc')

Monthly Downloads

50

Version

0.1.0

License

GPL (>= 2)

Maintainer

Kevin Ushey

Last Published

December 12th, 2012

Functions in Kmisc (0.1.0)

extract

Extract Variables from a List / Data Frame
kSave

Write out and Save a Tabular File
Kmisc

Kmisc
kSetwd

Set Working Directory
strslice

Slice a String at Consecutive Indices
kStripExtension

Strip File Extension
dapply

Apply a Function over a List
us

unlist( strsplit( ... ) )
kRev

Reverse Elements of a Character Vector
kMakeDummy

Make Dummy Variables from Factor
hSvg

Print SVG to File and Return HTML
getObjects

Get all Objects in Environment
kFactorToChar

Converts Factors to Characters in Data Frame
lg

length( grep( ... ) )
without.re

Remove Variables from a List / Data Frame, with Regular Expressions
html

HTML Tags
extract.re

Extract Variable from a Data Frame / List, with Regular Expressions
ngrep

Inverse grep
pxt

Make 2x2 HTML Contingency Table
kLoad

Load and Assign an R Object
%nin%

Inverse Value Matching
print.kHTML

Print kHTML Objects
kColor

Generate Gradient from Continuous Variable
kFivenum

Fivenum with Names
write.cb

Write Tabular Data to the Clipboard
kImg

HTML - Source an Image
kSplit

Split a Vector of Strings Following Regular Structure
u

Unique elements in a vector
hImg

Print Plot to File and Return HTML
makeHTMLTable

Make HTML Table from R 'table-like' Object
read.cb

Read Tabular Data from the Clipboard
kAnova

Nicely Formatted ANOVA Table
re.exists

Check whether Regular Expression was Found
kTable

Make Nicely Formatted Tables
without

Remove Variables from a List / Data Frame
kReplace

Replace Elements in a Vector
makeHTMLTag

Make HTML Elements
kCharToFactor

Converts Characters to Factors in Data Frame
kStackList

Stack a List of DataFrame-like Objects
kmeans_plot

k-means Diagnostic Plot
kMerge

Merge (Left Join) with Index Retainment
kSvg

HTML - Source an SVG file
kCoef

Nicely Formatted Model Coefficient Output
lu

Number of non-NA unique elements in a vector