Learn R Programming

AHPWR (version 0.1.2)

xlsx_ahp: build file with judgment matrices

Description

Function to build file with judgment matrices

Usage

xlsx_ahp(m, file, sheet, append = FALSE)

Value

Returns a xlsx document

Arguments

m

is a matrix of pairwise comparison

file

is the path to the output file.

sheet

is a character string with the sheet name.

append

is a logical value indicating if m should be appended to an existing file.

Author

Luciane Ferreira Alcoforado

Examples

Run this code
# Criando um arquivo temporário para o exemplo funcionar sem erro
library(openxlsx)
m1 <- matrix(c(1, 2, 0.5, 1), nrow = 2)
tmp <- tempfile(fileext = ".xlsx")
write.xlsx(list(Sheet1 = m1), file = tmp)

# Agora testando a função ler com o arquivo que acabamos de criar
lista = ler(tmp)
lista

Run the code above in your browser using DataLab