dimnames.ffdf.rdGetting and setting dimnames, columnnames or rownames
a ffdf object
a character vector, or, for dimnames a list with two character vectors
It is recommended not to assign row.names to a large ffdf object.
The assignment function return the changed ffdf object. The other functions return the expected.
ffd <- as.ffdf(data.frame(a=1:26, b=letters, stringsAsFactors = TRUE))
dimnames(ffd)
#> [[1]]
#> NULL
#>
#> [[2]]
#> [1] "a" "b"
#>
row.names(ffd) <- letters
dimnames(ffd)
#> [[1]]
#> [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s"
#> [20] "t" "u" "v" "w" "x" "y" "z"
#>
#> [[2]]
#> [1] "a" "b"
#>
ffd
#> ffdf (all open) dim=c(26,2), dimorder=c(1,2) row.names=character
#> ffdf virtual mapping
#> PhysicalName VirtualVmode PhysicalVmode AsIs VirtualIsMatrix
#> a a integer integer FALSE FALSE
#> b b integer integer FALSE FALSE
#> PhysicalIsMatrix PhysicalElementNo PhysicalFirstCol PhysicalLastCol
#> a FALSE 1 1 1
#> b FALSE 2 1 1
#> PhysicalIsOpen
#> a TRUE
#> b TRUE
#> ffdf data
#> a b
#> a 1 a
#> b 2 b
#> c 3 c
#> d 4 d
#> e 5 e
#> f 6 f
#> g 7 g
#> h 8 h
#> : : :
#> s 19 s
#> t 20 t
#> u 21 u
#> v 22 v
#> w 23 w
#> x 24 x
#> y 25 y
#> z 26 z
rm(ffd); gc()
#> used (Mb) gc trigger (Mb) max used (Mb)
#> Ncells 1136619 60.8 1994352 106.6 1994352 106.6
#> Vcells 2107791 16.1 8388608 64.0 3981144 30.4