Skip to content

Commit

Permalink
use srcref()
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirill Müller committed Mar 9, 2016
1 parent 70823d1 commit f6d9d1c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions R/trace_calls.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ impute_srcref <- function(x, parent_ref) {
pd_child <- pd[pd$parent == expr_id,]

make_srcref <- function(from, to = from) {
structure(
srcref(
attr(parent_ref, "srcfile"),
c(pd_child$line1[from],
pd_child$col1[from],
pd_child$line2[to],
Expand All @@ -145,9 +146,7 @@ impute_srcref <- function(x, parent_ref) {
pd_child$col2[to],
pd_child$line1[from],
pd_child$line2[to]
),
srcfile = attr(parent_ref, "srcfile"),
class = "srcref")
))
}

switch(
Expand Down

1 comment on commit f6d9d1c

@lintr-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R/trace_calls.R:136:39: style: Commas should always have a space after.

pd_child <- pd[pd$parent == expr_id,]
                                      ^

Please sign in to comment.