Type: Package
Title: The Ultimate Helper for Clumsy Fingers
Date: 2017-07-05
Version: 0.1.21
Author: Vincent Guyader
Maintainer: Vincent Guyader <vincent@thinkr.fr>
BugReports: https://github.com/ThinkRstat/fcuk/issues
URL: https://github.com/ThinkRstat/fcuk
Description: Automatically suggests a correction when a typo occurs.
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1.9000
Imports: stringdist, purrr, magrittr, tibble
Suggests: testthat, knitr, rmarkdown
VignetteBuilder: knitr
ByteCompile: true
NeedsCompilation: no
Packaged: 2017-07-07 23:24:15 UTC; vincent
Repository: CRAN
Date/Publication: 2017-07-08 03:40:18 UTC

fcuk

Description

Automatically suggests a correction when a typo occurs.

Author(s)

vincent <vincent@thinkr.fr>


Add library(fcuk) to the .Rprofile file

Description

After calling this function, fcuk will be launched everytime you launch your current R project.

Usage

add_fcuk_to_rprofile()

Examples

fcuk::add_fcuk_to_rprofile()

Capture and parse an error message.

Description

Capture and parse an error message.

Usage

catch_error(sentence = geterrmessage())

Arguments

sentence

an error message to parse

Examples

catch_error()
catch_error("Error: object 'iri' not found\n")
catch_error("Error: object 'view' not found\n")



Error Analysis

Description

Error Analysis

Usage

error_analysis(asked_objet = catch_error(), n = 2)

Arguments

asked_objet

the name to analyse

n

number of names to suggest

Examples

fcuk::error_analysis() #last error is analysed
fcuk::error_analysis("view")
fcuk::error_analysis("iri")

Find closest object names

Description

Analyse a typo and suggests the two closest names.

Usage

error_correction_propostion(asked_objet, method = "jaccard", n = 2)

Arguments

asked_objet

the R name producing an error

method

Method for distance calculation. The default is "jaccard", see stringdist-metrics.

n

number of corrections to suggest.

Value

a character vector with the closest neighbors

Examples

error_correction_propostion("iri")

Extract the name of all objects loaded in the R environments

Description

Fetch the name of all objects loaded in the environments (functions, values, data...)

Usage

get_all_objets_from_r()

Value

a list with the names of all objects contained in the environments

Examples

get_all_objets_from_r()

Init error tracker

Description

After lauching this function, every error message will be analysed. This function is called when loading the package.

Usage

init_error_tracker()

Examples

getOption("error")
fcuk::init_error_tracker()
getOption("error")

Remove error tracker

Description

After lauching this function, the errors will no longer be analysed.

Usage

remove_error_tracker()

Examples

getOption("error")
fcuk::remove_error_tracker()
getOption("error")