Skip to content

Commit 3d51d0f

Browse files
authored
Merge pull request #499 from lucdw/master
remove the use of function shorthand \(...)
2 parents a92c5e4 + 00f2924 commit 3d51d0f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

R/lav_plotinfo_positions.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ lav_plotinfo_positions_one <- function(
159159
}
160160
groups[[g]] <- group
161161
}
162-
width <- sapply(groups, \(g) g$width.height[1L])
163-
height <- sapply(groups, \(g) g$width.height[2L])
164-
columns <- sapply(groups, \(g) g$matrixrowcol[2L])
165-
rows <- sapply(groups, \(g) g$matrixrowcol[1L])
162+
width <- sapply(groups, function(g) g$width.height[1L])
163+
height <- sapply(groups, function(g) g$width.height[2L])
164+
columns <- sapply(groups, function(g) g$matrixrowcol[2L])
165+
rows <- sapply(groups, function(g) g$matrixrowcol[1L])
166166
colnums <- sort(unique(columns))
167167
rownums <- sort(unique(rows))
168-
colwidths <- sapply(colnums, \(i) max(width[columns == i]))
169-
rowheights <- sapply(rownums, \(i) max(height[rows == i]))
168+
colwidths <- sapply(colnums, function(i) max(width[columns == i]))
169+
rowheights <- sapply(rownums, function(i) max(height[rows == i]))
170170
for (g in groups) {
171171
thisrow <- g$matrixrowcol[1L]
172172
thiscol <- g$matrixrowcol[2L]
@@ -231,8 +231,8 @@ lav_plotinfo_positions_one <- function(
231231
}
232232
}
233233
#### place anchors ####
234-
groupmaxcol <- max(sapply(groups, \(g) g$matrixrowcol[2L]))
235-
groupmaxrow <- max(sapply(groups, \(g) g$matrixrowcol[1L]))
234+
groupmaxcol <- max(sapply(groups, function(g) g$matrixrowcol[2L]))
235+
groupmaxrow <- max(sapply(groups, function(g) g$matrixrowcol[1L]))
236236
for (j in seq_along(edgs$id)) {
237237
thisedge <- edgs[j, ]
238238
van <- nods[which(nods$id == thisedge$van), ]

0 commit comments

Comments
 (0)