Skip to contents

In Momocs, Ldk classes objects are lists of configurations of landmarks, with optionnal components, on which generic methods such as plotting methods (e.g. stack) and specific methods (e.g. fgProcrustes). Ldk objects are primarily Coo objects. In a sense, morphometrics methods on Ldk objects preserves (x, y) coordinates and LdkCoe are also Ldk objects.

Usage

Ldk(coo, fac = dplyr::tibble(), links = NULL, slidings = NULL)

Arguments

coo

a list of matrices of (x; y) coordinates, or an array, or an Ldk object or a data.frame (and friends)

fac

(optionnal) a data.frame of factors and/or numerics specifying the grouping structure

links

(optionnal) a 2-columns matrix of 'links' between landmarks, mainly for plotting

slidings

(optionnal) a 3-columns matrix defining (if any) sliding landmarks

Value

an Ldk object

Details

All the shapes in x must have the same number of landmarks. If you are trying to make an Ldk object from an Out or an Opn object, try coo_sample beforehand to homogeneize the number of coordinates among shapes. Please note that Ldk methods are as experimental.

implementation of $slidings is inspired by geomorph

See also

Other classes: Coe(), Coo(), OpnCoe(), Opn(), OutCoe(), Out(), TraCoe()

Examples

#Methods on Ldk
methods(class=Ldk)
#>  [1] MSHAPES         combine         coo_bookstein   coo_slice      
#>  [5] d               def_links       def_slidings    fgProcrustes   
#>  [9] fgsProcrustes   get_ldk         get_slidings    mosaic         
#> [13] panel           pile            rearrange_ldk   slidings_scheme
#> [17] stack           which_out      
#> see '?methods' for accessing help and source code

str(mosquito)
#> coo : List of 126
#>  $ shp1  : num [1:100, 1:2] -0.107 -0.134 -0.164 -0.199 -0.234 ...
#>  $ shp2  : num [1:100, 1:2] -0.11 -0.137 -0.167 -0.2 -0.236 ...
#>  $ shp3  : num [1:100, 1:2] -0.0877 -0.1085 -0.1325 -0.1601 -0.1895 ...
#>  $ shp4  : num [1:100, 1:2] -0.0997 -0.1239 -0.1515 -0.1835 -0.218 ...
#>  $ shp5  : num [1:100, 1:2] -0.0971 -0.1205 -0.145 -0.1729 -0.2037 ...
#>  $ shp6  : num [1:100, 1:2] -0.0927 -0.1161 -0.1411 -0.1691 -0.2001 ...
#>  $ shp7  : num [1:100, 1:2] -0.109 -0.136 -0.166 -0.2 -0.24 ...
#>  $ shp8  : num [1:100, 1:2] -0.0991 -0.1245 -0.1532 -0.1837 -0.2199 ...
#>  $ shp9  : num [1:100, 1:2] -0.101 -0.126 -0.155 -0.186 -0.223 ...
#>  $ shp10 : num [1:100, 1:2] -0.0849 -0.1063 -0.129 -0.1529 -0.1811 ...
#>  $ shp11 : num [1:100, 1:2] -0.0921 -0.1162 -0.1424 -0.1704 -0.2019 ...
#>  $ shp12 : num [1:100, 1:2] -0.084 -0.104 -0.129 -0.154 -0.183 ...
#>  $ shp13 : num [1:100, 1:2] -0.111 -0.139 -0.171 -0.206 -0.247 ...
#>  $ shp14 : num [1:100, 1:2] -0.0932 -0.1147 -0.1368 -0.164 -0.1953 ...
#>  $ shp15 : num [1:100, 1:2] -0.101 -0.124 -0.151 -0.183 -0.218 ...
#>  $ shp16 : num [1:100, 1:2] -0.105 -0.131 -0.16 -0.193 -0.228 ...
#>  $ shp17 : num [1:100, 1:2] -0.109 -0.137 -0.167 -0.198 -0.234 ...
#>  $ shp18 : num [1:100, 1:2] -0.128 -0.16 -0.195 -0.235 -0.28 ...
#>  $ shp19 : num [1:100, 1:2] -0.113 -0.139 -0.171 -0.206 -0.246 ...
#>  $ shp20 : num [1:100, 1:2] -0.104 -0.131 -0.16 -0.192 -0.228 ...
#>  $ shp21 : num [1:100, 1:2] -0.126 -0.157 -0.191 -0.23 -0.271 ...
#>  $ shp22 : num [1:100, 1:2] -0.116 -0.146 -0.181 -0.217 -0.257 ...
#>  $ shp23 : num [1:100, 1:2] -0.117 -0.146 -0.18 -0.216 -0.255 ...
#>  $ shp24 : num [1:100, 1:2] -0.123 -0.154 -0.188 -0.225 -0.267 ...
#>  $ shp25 : num [1:100, 1:2] -0.107 -0.134 -0.163 -0.196 -0.233 ...
#>  $ shp26 : num [1:100, 1:2] -0.0917 -0.1141 -0.1381 -0.1675 -0.1995 ...
#>  $ shp27 : num [1:100, 1:2] -0.0979 -0.1222 -0.1477 -0.1744 -0.2049 ...
#>  $ shp28 : num [1:100, 1:2] -0.121 -0.151 -0.183 -0.217 -0.259 ...
#>  $ shp29 : num [1:100, 1:2] -0.124 -0.156 -0.193 -0.234 -0.28 ...
#>  $ shp30 : num [1:100, 1:2] -0.106 -0.132 -0.161 -0.193 -0.232 ...
#>  $ shp31 : num [1:100, 1:2] -0.101 -0.126 -0.154 -0.186 -0.22 ...
#>  $ shp32 : num [1:100, 1:2] -0.126 -0.157 -0.19 -0.228 -0.271 ...
#>  $ shp33 : num [1:100, 1:2] -0.126 -0.157 -0.195 -0.237 -0.284 ...
#>  $ shp34 : num [1:100, 1:2] -0.125 -0.155 -0.186 -0.224 -0.266 ...
#>  $ shp35 : num [1:100, 1:2] -0.0985 -0.1235 -0.1506 -0.1799 -0.2125 ...
#>  $ shp36 : num [1:100, 1:2] -0.119 -0.149 -0.183 -0.221 -0.263 ...
#>  $ shp37 : num [1:100, 1:2] -0.113 -0.141 -0.173 -0.209 -0.248 ...
#>  $ shp38 : num [1:100, 1:2] -0.0991 -0.1227 -0.1493 -0.1803 -0.2158 ...
#>  $ shp39 : num [1:100, 1:2] -0.107 -0.134 -0.164 -0.196 -0.235 ...
#>  $ shp40 : num [1:100, 1:2] -0.102 -0.128 -0.155 -0.186 -0.221 ...
#>  $ shp41 : num [1:100, 1:2] -0.122 -0.153 -0.188 -0.23 -0.274 ...
#>  $ shp42 : num [1:100, 1:2] -0.115 -0.145 -0.178 -0.214 -0.255 ...
#>  $ shp43 : num [1:100, 1:2] -0.106 -0.133 -0.162 -0.196 -0.232 ...
#>  $ shp44 : num [1:100, 1:2] -0.119 -0.151 -0.185 -0.225 -0.268 ...
#>  $ shp45 : num [1:100, 1:2] -0.11 -0.137 -0.167 -0.203 -0.242 ...
#>  $ shp46 : num [1:100, 1:2] -0.102 -0.126 -0.155 -0.188 -0.225 ...
#>  $ shp47 : num [1:100, 1:2] -0.117 -0.146 -0.179 -0.218 -0.259 ...
#>  $ shp48 : num [1:100, 1:2] -0.102 -0.126 -0.154 -0.184 -0.217 ...
#>  $ shp49 : num [1:100, 1:2] -0.105 -0.132 -0.161 -0.193 -0.231 ...
#>  $ shp50 : num [1:100, 1:2] -0.121 -0.151 -0.185 -0.224 -0.267 ...
#>  $ shp51 : num [1:100, 1:2] -0.134 -0.168 -0.205 -0.245 -0.296 ...
#>  $ shp52 : num [1:100, 1:2] -0.106 -0.133 -0.162 -0.193 -0.23 ...
#>  $ shp53 : num [1:100, 1:2] -0.119 -0.148 -0.18 -0.217 -0.257 ...
#>  $ shp54 : num [1:100, 1:2] -0.121 -0.151 -0.184 -0.221 -0.264 ...
#>  $ shp55 : num [1:100, 1:2] -0.0875 -0.1083 -0.1316 -0.1588 -0.1877 ...
#>  $ shp56 : num [1:100, 1:2] -0.104 -0.128 -0.159 -0.193 -0.229 ...
#>  $ shp57 : num [1:100, 1:2] -0.128 -0.16 -0.197 -0.237 -0.283 ...
#>  $ shp58 : num [1:100, 1:2] -0.101 -0.125 -0.151 -0.184 -0.22 ...
#>  $ shp59 : num [1:100, 1:2] -0.105 -0.13 -0.16 -0.194 -0.231 ...
#>  $ shp60 : num [1:100, 1:2] -0.135 -0.169 -0.208 -0.253 -0.304 ...
#>  $ shp61 : num [1:100, 1:2] -0.104 -0.131 -0.161 -0.193 -0.229 ...
#>  $ shp62 : num [1:100, 1:2] -0.0895 -0.1115 -0.1345 -0.1587 -0.1884 ...
#>  $ shp63 : num [1:100, 1:2] -0.117 -0.147 -0.179 -0.216 -0.259 ...
#>  $ shp64 : num [1:100, 1:2] -0.115 -0.144 -0.176 -0.214 -0.256 ...
#>  $ shp65 : num [1:100, 1:2] -0.109 -0.135 -0.164 -0.2 -0.238 ...
#>  $ shp66 : num [1:100, 1:2] -0.125 -0.158 -0.195 -0.234 -0.276 ...
#>  $ shp67 : num [1:100, 1:2] -0.107 -0.135 -0.163 -0.195 -0.234 ...
#>  $ shp68 : num [1:100, 1:2] -0.122 -0.152 -0.184 -0.221 -0.266 ...
#>  $ shp69 : num [1:100, 1:2] -0.118 -0.145 -0.177 -0.216 -0.258 ...
#>  $ shp70 : num [1:100, 1:2] -0.116 -0.144 -0.176 -0.21 -0.25 ...
#>  $ shp71 : num [1:100, 1:2] -0.131 -0.164 -0.2 -0.244 -0.292 ...
#>  $ shp72 : num [1:100, 1:2] -0.118 -0.148 -0.18 -0.215 -0.256 ...
#>  $ shp73 : num [1:100, 1:2] -0.0996 -0.1229 -0.1496 -0.1778 -0.2106 ...
#>  $ shp74 : num [1:100, 1:2] -0.118 -0.149 -0.181 -0.218 -0.259 ...
#>  $ shp75 : num [1:100, 1:2] -0.118 -0.147 -0.179 -0.214 -0.252 ...
#>  $ shp76 : num [1:100, 1:2] -0.128 -0.159 -0.191 -0.227 -0.268 ...
#>  $ shp77 : num [1:100, 1:2] -0.126 -0.159 -0.193 -0.229 -0.271 ...
#>  $ shp78 : num [1:100, 1:2] -0.111 -0.139 -0.173 -0.21 -0.249 ...
#>  $ shp79 : num [1:100, 1:2] -0.121 -0.151 -0.183 -0.22 -0.261 ...
#>  $ shp80 : num [1:100, 1:2] -0.117 -0.146 -0.178 -0.213 -0.253 ...
#>  $ shp81 : num [1:100, 1:2] -0.109 -0.137 -0.168 -0.202 -0.243 ...
#>  $ shp82 : num [1:100, 1:2] -0.118 -0.149 -0.184 -0.222 -0.264 ...
#>  $ shp83 : num [1:100, 1:2] -0.12 -0.15 -0.183 -0.219 -0.256 ...
#>  $ shp84 : num [1:100, 1:2] -0.135 -0.168 -0.207 -0.25 -0.299 ...
#>  $ shp85 : num [1:100, 1:2] -0.118 -0.149 -0.181 -0.218 -0.261 ...
#>  $ shp86 : num [1:100, 1:2] -0.119 -0.149 -0.181 -0.221 -0.265 ...
#>  $ shp87 : num [1:100, 1:2] -0.106 -0.132 -0.162 -0.194 -0.232 ...
#>  $ shp88 : num [1:100, 1:2] -0.104 -0.128 -0.157 -0.188 -0.22 ...
#>  $ shp89 : num [1:100, 1:2] -0.106 -0.132 -0.162 -0.195 -0.23 ...
#>  $ shp90 : num [1:100, 1:2] -0.127 -0.159 -0.195 -0.235 -0.282 ...
#>  $ shp91 : num [1:100, 1:2] -0.111 -0.139 -0.168 -0.202 -0.238 ...
#>  $ shp92 : num [1:100, 1:2] -0.101 -0.126 -0.154 -0.187 -0.224 ...
#>  $ shp93 : num [1:100, 1:2] -0.127 -0.158 -0.193 -0.231 -0.278 ...
#>  $ shp94 : num [1:100, 1:2] -0.104 -0.13 -0.159 -0.193 -0.23 ...
#>  $ shp95 : num [1:100, 1:2] -0.0868 -0.1067 -0.1271 -0.1523 -0.182 ...
#>  $ shp96 : num [1:100, 1:2] -0.103 -0.128 -0.156 -0.188 -0.225 ...
#>  $ shp97 : num [1:100, 1:2] -0.102 -0.127 -0.156 -0.188 -0.222 ...
#>  $ shp98 : num [1:100, 1:2] -0.104 -0.132 -0.161 -0.192 -0.225 ...
#>  $ shp99 : num [1:100, 1:2] -0.108 -0.133 -0.16 -0.193 -0.227 ...
#>   [list output truncated]
#> fac : tibble [0 × 0] (S3: tbl_df/tbl/data.frame)
#>  Named list()
#> ldk :  list()