Operators acting on VoxelSpace object. If user attempts

# S4 method for VoxelSpace
$(x, name)

# S4 method for VoxelSpace,ANY,missing
[[(x, i, j, ...)

# S4 method for VoxelSpace
$(x, name) <- value

# S4 method for VoxelSpace,ANY,missing
[[(x, i, j) <- value

# S4 method for VoxelSpace
$(x, name) <- value

Arguments

x

a VoxelSpace object

name

A literal character string or a name (possibly backtick quoted).

i

string, name of elements to extract.

j

Unused.

...

Unused.

value

typically an array-like R object of a similar class as x.

Examples

# load a voxel file
vxsp <- readVoxelSpace(system.file("extdata", "tls_sample.vox", package = "AMAPVox"))

# extract columns or header parameters
vxsp$nbSampling
#>   [1]  3369  3129  2406  2106  1919  1775  1669  1556  1547  1322  3400  2922
#>  [13]  2558  2104  1862  1674  1500  1407  1320  1154  3336  2926  2457  2027
#>  [25]  1764  1525  1222  1083   983  1046  3677  2572  1992  1540  1292  1080
#>  [37]   902   721   666   873  2296  2808  2381  1910  1567  1224  1021   835
#>  [49]   776   642   578  1188  1591  1815  1608  1350  1077   874   567   534
#>  [61]  4690  3599  2852  2333  2035  1848  1693  1531  1445  1306  5719  4059
#>  [73]  3075  2329  1923  1654  1402  1138  1015  1039  5872  4328  3073  2210
#>  [85]  1699  1428  1155   896   702   833  5702  3643  2425  1766  1397  1151
#>  [97]  1108   766   488   548  2821  2881  2965  2217  1715  1276  1226   910
#> [109]   702   633   563   840  1499  1897  1725  1364  1177   965   765   521
#> [121]  6946  4701  3295  2459  2028  1768  1592  1478  1354  1283  9918  5625
#> [133]  3522  2456  1906  1611  1438  1174   941   984 12599  6100  3296  2098
#> [145]  1673  1414  1294   989   677   653  7761  5632  3046  2046  1577  1383
#> [157]  1173   867   627   425  1873  3002  3282  2373  1831  1539  1179   817
#> [169]   582   441   897   709  1544  1965  1789  1451  1122   736   606   568
#> [181]  6421  5652  3559  2543  2079  1800  1652  1596  1444  1359 15998  7004
#> [193]  3769  2427  1937  1635  1418  1335   991   788 32506  7795  3723  2270
#> [205]  1709  1523  1375  1070   728   466 13702  7620  3697  2343  1745  1447
#> [217]  1160   842   637   503  1562  3511  3488  2365  1731  1323  1141   725
#> [229]   593   455  1200   764  1708  2037  1626  1260   995   630   458   440
#> [241]  4353  6016  3656  2667  2208  1953  1901  1735  1656  1605 13151  6854
#> [253]  3751  2412  1818  1551  1496  1400  1193  1080 22096  7190  3652  2244
#> [265]  1712  1456  1373   976   712   800 13480  6647  3591  2367  1771  1321
#> [277]  1084   717   614   589  4226  4648  3405  2335  1659  1199   961   577
#> [289]   473   465  1004  1562  2289  2173  1625  1280   950   645   495   535
#> [301]  4989  4961  3461  2670  2284  2135  2149  2088  1914  1815  8577  5370
#> [313]  3497  2579  2085  1797  1585  1385  1252  1267  9169  5253  3339  2329
#> [325]  1792  1453  1143  1057   971  1038  7971  4936  3266  2325  1842  1409
#> [337]  1198  1131   904   862  5362  4574  3091  2295  1836  1465  1255  1043
#> [349]   933   839  2151  2881  2716  2167  1777  1489  1298  1094   964   771
#> [361]  4556  3838  3048  2535  2255  2185  2177  2198  2109  1877  4682  3827
#> [373]  2927  2375  2096  1939  1806  1641  1487  1416  4401  3555  2764  2194
#> [385]  1913  1701  1500  1304  1196  1134  4381  3394  2677  2143  1853  1637
#> [397]  1518  1335  1208  1135  4063  3410  2593  2095  1794  1575  1451  1320
#> [409]  1183   856  3263  3106  2356  1970  1712  1533  1394  1261   823   813
vxsp[["i"]]
#>   [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#>  [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
#>  [75] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
#> [112] 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
#> [149] 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3
#> [186] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
#> [223] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
#> [260] 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
#> [297] 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
#> [334] 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6
#> [371] 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6
#> [408] 6 6 6 6 6 6 6 6 6 6 6 6 6
vxsp[["mincorner"]]
#>    x    y    z 
#>  4.0  1.0 -1.5 

if (FALSE) {
# add new column
vxsp[["pad_capped"]] <- ifelse(vxsp$PadBVTotal > 0.5, 0.5, vxsp$PadBVTotal)
# update header parameter
vxsp[["max_pad"]] <- 0.5
}