eatyourdata: A snake game where you eat your own data.

Description Usage Arguments Details Value Author(s) Examples

View source: R/eatyourdata.R

Description

Have you ever look to you data in a table and thought "What the hell am I going to do with this"? Well, now you can play with it. Feed the snake in all dimensions of your data!

Usage

1
eatyourdata(data, ndim=4)

Arguments

data

A table or matrix with your data. Must be numeric and without missing data. How could you play if the data were missing? Let's be serious.

ndim

You can set the maximum of dimensions (aka components) to play.

Details

This implements a snake game where the objective is to eat the data points in a plot. However, if you data has more than 2 dimensions, well, you will have to navigate the snake in all the dimensions... this is not an easy task! But, no one knows your data better than you!

The first digestion of your data is through a PCA. Then the game procees and is quite simple to play. Start the game pressing "S" key and then use the arrows to navigate the snake. Numbers 1 to ndim-1 will allow to move to other dimensions: '1' plots first and second component, '2' plots second and third and so on. You have to move the snake to the red data point in all dimensions so it can eat.

Value

Returns the satisfaction of seeing your data being used correctly!

Author(s)

Pedro Tarroso

Examples

1
2
	# Wit Iris dataset
	eatyourdata(iris[1:4])

ptarroso/gameR documentation built on Nov. 17, 2021, 12:33 a.m.