n_times {dreamerr}R Documentation

Numbers in letters

Description

Set of (tiny) functions that convert integers into words.

Usage

n_times(n)

n_th(n)

n_letter(n)

Arguments

n

An integer vector.

Value

It returns a character vector of length one.

Functions

Author(s)

Laurent Berge

Examples


find = function(v, x){
  if(x %in% v){
    message("The number ", n_letter(x), " appears ", n_times(sum(v == x)),
            ", the first occurrence is the ", n_th(which(v==x)[1]), " element.")
  } else message("The number ", n_letter(x), " was not found.")
}

v = sample(100, 500, TRUE)
find(v, 6)




[Package dreamerr version 1.4.0 Index]