You are using the function table()
which results in an object table
R containing a name for each dimension.
For example, with the following Matrix m
:
m <- matrix(1:8, 4)
> matrix(1:8, 4)
[,1] [,2]
[1,] 1 5
[2,] 2 6
[3,] 3 7
[4,] 4 8
The function table(m)
will have the object name, in the case "m":
> table(m)
m
1 2 3 4 5 6 7 8
1 1 1 1 1 1 1 1
So the strange character is simply the name of the object used.
Taking this character will depend on the format you want when returning the function. For example, if you want to continue with the format table
you can use the argument dnn = ''
(which also allows you to rename the table
:
> prop.table(table(m, dnn = ''))
1 2 3 4 5 6 7 8
0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
Or you can simply convert the object to a data frame
:
> data.frame(prop.table(table(m)))
m Freq
1 1 0.125
2 2 0.125
3 3 0.125
4 4 0.125
5 5 0.125
6 6 0.125
7 7 0.125
8 8 0.125
Perfect. The function parameter ends up being the name of the dimension used. I understood. Are these specifications listed in the documentation? Where did you locate them?
– Arduin
Specifications are in the documentation:
?table
– Willian Vieira