dataOrder: Ordering data

Description Usage Arguments Value Examples

Description

This function is used by the MCMC.GBN function to ordered the data by the new order given by the rmallows or rmallowsBlocks functions.

All elements in data are ordered according to the new ord given by the user.

Usage

1

Arguments

data

data - Data is a format obtained by the function dataFormat. It's a list of observations, knock-out and means of the observatations.

ord

vector of integers - The new order of the data.

Value

The elements of data, x, int.nodes and int.means are all ordered according to the paramter ord.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
seed = 1990

p <- 10
m<-rep(0,10)
sigma<-rep(0.1,10) 

W <- 1*upper.tri(matrix(0,p,p))

data <- dataCreate(nbData = 2*p, p = 10,KO = list(1,9), nbKO = c(p,p), W = W , m = m,sigma = sigma, seed = seed)$data
ord <- sample(1:10,10,replace = FALSE)

dataOrder(data,ord)

andreamrau/GBNcausal documentation built on May 12, 2019, 3:34 a.m.