for a university project i’m interested in measured interdisciplinarity between a set of scientific articles.
I planned on using the R package Robustrao (documentation https://cran.r-project.org/web/packages/robustrao/robustrao.pdf)
In order to use this package i have to construct one matrix containing the similarity between scientifics disciplines and a dataframe with my articles and their cited disciplines ( exemples can be found in the robustrao github linked further down)
I’m having trouble constructing the matrix, for one i seem to have a data table instead of matrix altough i used did use ” matrix” and all the data was entenred correctly. I have no past experience nor knwoledge of R it’s kind of a one time usage for me.
Here is what i wrote :
donnees <- read.csv("data1.csv", sep = ";", header = FALSE)
if (dim(donnees)[1] != 254 | dim(donnees)[2] != 254) {
stop("Les dimensions des données ne correspondent pas à 254 x 254.")
}
noms_colonnes <- readLines("nom_colonnes.txt")
noms_lignes <- noms_colonnes
matrice <- matrix(numeric(), nrow = 254, ncol = 254)
colnames(matrice) <- noms_colonnes
rownames(matrice) <- noms_lignes
matrice <- as.matrix(donnees)
colnames(matrice) <- noms_colonnes
rownames(matrice) <- noms_lignes
print(rownames(matrice))
I was expecting something that looks like the Pubdata1 Rdata files from the package that can be found here : https://github.com/cran/robustrao/blob/master/data/pubdata1.RData
in essence my matrix is not considered as a Large Matrix but as a simple data table ?
Quateo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.