Learn R Programming

somspace (version 1.0.0)

sominp: Create sominp object

Description

sominp transforms the data set from data.table to somsp format, which can be used as argument in the somspa function.

Usage

sominp(x)

Arguments

x

The data.table object which will be tranformed to somsp object.

Value

A sominp object. It contains:

  • a matrix that can be used as input for the som function of the kohonen package.

  • a data.table with the with spatial point coordinates and a corresponding id.

  • a data.table with the original dataset.

Details

x should be in tidy format with four columns: time, latitude, longitude and variable.

See Also

somspa

Examples

Run this code
# NOT RUN {
dummy <- owda[Time <= 1510] #toy example
inp_som <- sominp(dummy)

# }
# NOT RUN {
inp_som <- sominp(owda)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab