Package 'r2dictionary'

Title: A Mini-Dictionary for 'Shiny' and 'Rmarkdown' Documents
Description: Despite the predominant use of R for data manipulation and various robust statistical calculations, in recent years, more people from various disciplines are beginning to use R for other purposes. A critical milestone that has enabled large influx of users in the R community is the development of the Tidyverse family of packages and Rmarkdown. With the latter, one can write all kinds of documents and produce output in formats such html and pdf very easily. In doing this seemlessly, further tools are needed for such users to easily and freely write in R for all kinds of purposes. The r2dictionary introduces a means for users to directly search for definitions of terms within the R environment.
Authors: Obinna Obianom [aut, cre]
Maintainer: Obinna Obianom <[email protected]>
License: MIT + file LICENSE
Version: 0.2
Built: 2024-11-04 03:18:26 UTC
Source: https://github.com/oobianom/r2dictionary

Help Index


Concact multiple values

Description

Concact multiple values

Usage

concatAll(..., sep = "; ")

Arguments

...

the list of values to be concacted

sep

the separated for concating

Examples

a = 5
b = 10
c = "done"
concatAll(a,b,c)

Define words in english

Description

Given a word, a mini-dictionary is searched and results are retrieved with the relevant definitions

Usage

define(term, limitResult = 5, printResult = TRUE)

Arguments

term

The term for which the definition is requested

limitResult

The limit of how many results to show

printResult

Print the result to console. If set to FALSE, then results will be return in a vector

Value

Definition of word if it exists

Examples

## Not run: 
wordtodefine <- "smile"
define(wordtodefine)

## End(Not run)

Define Selected Text

Description

Detects a selected word in an open document. This was written for Rmarkdown writing, but it can be used for an open document. Using the addin is the most preferred means to call this function, albeit it can be called directly from the console.

Usage

defineSel()

Value

definition of the selected text

Examples

## Not run: 
defineSel()

## End(Not run)

Define Selected Text

Description

Detects a selected word in an open document. This was written for Rmarkdown writing, but it can be used for an open document. Using the addin is the most preferred means to call this function, albeit it can be called directly from the console.

Usage

defineSelected()

Value

definition of the selected text

Examples

## Not run: 
defineSelected()

## End(Not run)

An alias to define words in english

Description

Given a word, a mini-dictionary is searched and results are retrieved with the relevant definitions

Usage

definition(term, limitResult = 5, printResult = TRUE)

Arguments

term

The term for which the definition is requested

limitResult

The limit of how many results to show

printResult

Print the result to console. If set to FALSE, then results will be return in a vector

Value

Definition of word if it exisits

Examples

## Not run: 
wordtodefine <- "zipzagged"
definition(wordtodefine)

## End(Not run)

Fetch Selected Text

Description

Fetch Selected Text

Usage

fetchSelectedText()

Value

The selected text and if it contains alphabets

Examples

## Not run: 
fetchSelectedText()

## End(Not run)

Check if dictionary is loaded

Description

Check if dictionary is loaded

Usage

isDictionaryLoaded()

Value

Boolean result

Examples

## Not run: 
y = isDictionaryLoaded()
y

## End(Not run)

Dictionary content loader

Description

Load the dictionary into global environment

Usage

loadDictionary()

Examples

loadDictionary()

An alias to efine words in english

Description

Given a word, a mini-dictionary is searched and results are retrieved with the relevant definitions

Usage

meaning(term, limitResult = 5, printResult = TRUE)

Arguments

term

The term for which the definition is requested

limitResult

The limit of how many results to show

printResult

Print the result to console. If set to FALSE, then results will be return in a vector

Value

Definition of word if it exisits

Examples

## Not run: 
wordtodefine <- "r2shortocde"
meaning(wordtodefine)

## End(Not run)

Split definition character and count

Description

Split definition character and count

Usage

splitSpa12(word)

Arguments

word

the fullword to split

Value

whole word from the given text

Examples

## Not run: 
wordtodefine <- "smile v"
splitSpa12(wordtodefine)

## End(Not run)