Skip to content

Commit

Permalink
enough trying to do fancy R tricks... just use rep_len
Browse files Browse the repository at this point in the history
  • Loading branch information
dgkf committed Jan 11, 2024
1 parent 4594612 commit 0b27a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/srcref_df.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pkg_srcrefs_df <- function(x) {
srcs <- pkg_srcrefs(x)
df <- as.data.frame(srcs)
has_srcref <- vapply(df$srcref, inherits, logical(1L), "srcref")
df$namespace[] <- NA_character_
df$namespace <- rep_len(NA_character_, nrow(df))

df[has_srcref, "namespace"] <- vapply(
srcs[has_srcref],
Expand Down

0 comments on commit 0b27a68

Please sign in to comment.