Package 'ztype'

Title: Run a Ztype Game Loaded with R Functions
Description: How fast can you type R functions on your keyboard? Find out by running a 'zty.pe' game: export R functions as instructions to type to destroy opponents vessels.
Authors: Vincent Guyader
Maintainer: Vincent Guyader <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-08-28 04:05:00 UTC
Source: https://github.com/cran/ztype

Help Index


gen_game

Description

generate a ZType game by puhsing a set of levels on the website.

Usage

gen_game(set_of_levels, open = FALSE)

Arguments

set_of_levels

the set of levels to use

open

booleen open browser

Examples

## Not run: 
require(ztype)
require(magrittr)
c("dplyr","ggplot2","lubridate") %>% gen_set_of_words() %>%
gen_set_of_levels(10) %>%
gen_game() %>% browseURL()

## End(Not run)

gen_set_of_levels

Description

generate a set of levels with increasing difficulty

Usage

gen_set_of_levels(set_of_words, nb = 25)

Arguments

set_of_words

a sorted vector of the collection of words to use

nb

the number of levels to generate

Examples

require(ztype)
require(magrittr)
c("dplyr","ggplot2","lubridate") %>% gen_set_of_words() %>%
gen_set_of_levels(10) %>% cat()

gen_set_of_words

Description

extracts all function names from a given list of packages

Usage

gen_set_of_words(packages)

Arguments

packages

character vector. package(s) to parse and extract function names from

Value

a character vector

Examples

## Not run: 
require(ztype)
require(magrittr)
c("dplyr","ggplot2","lubridate") %>% gen_set_of_words()

## End(Not run)

level

Description

generates a collection of words to build a ZType game level

Usage

level(set_of_words, quantity, difficulty)

Arguments

set_of_words

a sorted vector of the collection of words to use

quantity

an integer the number of words to pick in

difficulty

an integer reflecting the level's difficulty

Examples

require(ztype)
require(magrittr)
c("dplyr","ggplot2","lubridate") %>% gen_set_of_words() %>% level(10,50)

ztype

Description

How fast can you type R functions on your keyboard? Find out by running a 'zty.pe' game: export R functions as instructions to type to destroy opponents vessels.

launch a ZType game using function names of R packages

Usage

ztype(packages = c("dplyr", "ggplot2", "lubridate"), nb = 25)

Arguments

packages

a vector containing installed packages from which extract function names

nb

number of levels to design in the ZType game

Examples

## Not run: 
require(ztype)
require(magrittr)
ztype() # dplyr, ggplot2 and lubridate
c("lubridate") %>% ztype()

## End(Not run)




## Not run: 
require(ztype)
require(magrittr)
ztype()# dplyr, ggplot2 and lubridate
c("lubridate") %>% ztype()

## End(Not run)