Provo a utilizzare il pacchetto bigmemory
in R e sono bloccato all'inizio. Faccio:R :: bigmemory - come creare personaggi big.matrix?
temp <- matrix(paste("a",1:10), 5, 2)
e ottenere una matrice di caratteri. Va bene. Ma poi cerco:
x <- as.big.matrix(temp, type="char")
e ottengo una matrice piena di NA e il seguente messaggio:
Assignment will down cast from double to char
Hint: To remove this warning type: options(bigmemory.typecast.warning=FALSE)
Warning messages:
1: In as.big.matrix(temp, type = "char") : Casting to numeric type
2: In matrix(as.numeric(x), nrow = nrow(x), dimnames = dimnames(x)) :
NAs introduced by coercion
3: In SetElements.bm(x, i, j, value) :
Non sono sicuro di quello che sta succedendo, ma sembra big.matrix cerca di convertire tutti i miei testi in numeri nonostante type = "char"
. Come farlo funzionare?
grazie mille. Ora ho capito. – user1890450