Description Usage Arguments Details Value Author(s) Examples
See Details for a description of the individual functions.
1 2 3 | collapseVec(x, space=TRUE, quote=FALSE, as.expr=FALSE)
notification(x, depth=0)
upperFirst(x)
|
x |
a vector for |
space |
logical; if |
quote |
logical; if |
as.expr |
logical; if |
depth |
a non-negative integer. |
collapseVec
returns a string representing a vector, intended for printing or for entry as a value. The elements of the vector (“items”) are separated by commas and enclosed by parentheses.
notification
returns x
with the time and date appended, and depth
tabs prepended.
upperFirst
returns a version of x
with the first letter (if any) in the string in upppercase.
A string.
Daniel Dvorkin
1 2 3 4 5 6 7 8 9 10 11 | collapseVec(1:3) # "(1, 2, 3)"
collapseVec(1:3, as.expr=TRUE) # "c(1, 2, 3)"
evpat(collapseVec(1:3, as.expr=TRUE))^2 # [1] 1 4 9
notification("hello, world")
# "hello, world @ 2012-10-08 19:10:21 MDT"
message(notification("goodbye, cruel world", 2))
# goodbye, cruel world @ 2012-10-08 19:11:05 MDT
upperFirst(collapseVec(c("spam", "eggs"))) # "(Spam, eggs)"
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.