0
 > str(dtm)
List of 6
 $ i       : int [1:128403] 1 1 1 1 1 1 1 1 1 1 ...
 $ j       : int [1:128403] 1 2 3 4 5 6 7 8 9 10 ...
 $ v       : num [1:128403] 1 1 1 1 2 1 1 1 1 1 ...
 $ nrow    : int 500
 $ ncol    : int 8330

Could anyone please tell me what "i","j","v" here represent? Thanks!

  • if I use dtm$v, I will get a sequence of number. Could you please tell me what does these numbers represent? Cuz nrow denotes the number of rows, ncol denotes the number of columns, so I don't know what other number actually means. Thanks! – Qweuuu Qqqwer Oct 12 '18 at 13:54

1 Answers1

2

A dtm is basically a simple triplet matrix.

If you read the help with simple triplet matrix (?slam::simple_triplet_matrix) you can read the following:

i, j Integer vectors of row and column indices, respectively.

v Vector of values.

nrow, ncol Integer values specifying the number of rows and columns, respectively. Defaults are the maximum row and column indices, respectively

phiver
  • 23,048
  • 14
  • 44
  • 56