AMsnippets-package: An assortment of R snippets

Description Details Author(s) Examples

Description

The AMsnippets package is a collection of utilities that make certain repetitious or annoying tasks less repetitious or less annoying. Some of the functions were written as answers to questions at Stack Overflow; in such cases, a link to the original question has been provided.

Details

Package: AMsnippets
Type: Package
Version: 1.0
Date: 2013-02-08
License: GPL-2

Author(s)

Ananda Mahto, with functions by Rolf Turner, Akhil S Bhel, Anonymous

Maintainer: Ananda Mahto <mrdwab@gmail.com>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## aggregate2
aggregate2(ToothGrowth, "len", ".", c("sum", "mean"))

## CBIND
df1 <- data.frame(A = 1:5, B = letters[1:5])
df2 <- data.frame(C = 1:3, D = letters[1:3])
df3 <- data.frame(E = 1:8, F = letters[1:8], G = LETTERS[1:8])
#'CBIND(list(df1, df2, df3))

## FacsToChars
dat <- data.frame(title = c("title1", "title2", "title3"),
              author = c("author1", "author2", "author3"),
              customerID = c(1, 2, 1))
str(dat)
FacsToChars(dat, overwrite = TRUE)
str(dat)

## makemeNA
# Some sample data
temp <- data.frame(
V1 = c(1:3),
V2 = c(1, "*", 3),
V3 = c("a", "*", "c"),
V4 = c(".", "*", "3"))
temp
makemeNA(temp, c("*", "."))

mrdwab/AMsnippets documentation built on May 23, 2019, 7:15 a.m.