spNetwork icon indicating copy to clipboard operation
spNetwork copied to clipboard

encountering "Error in trim_lines_at(df1, graph_result, d, dd, i, donught) : object 'no_cut' not found"

Open jdjohn215 opened this issue 2 months ago • 3 comments

Hi, thanks for this remarkable package.

I'm occasionally encountering this error, "Error in trim_lines_at(df1, graph_result, d, dd, i, donught) : object 'no_cut' not found."

I think it's occurring on line 328 of isochrones_sf.R.

  if(sum(!test) > 0){ # line 285
    no_cut <- subset(df1, test)
    to_cut <- subset(df1, !test)
# lines 288-326 omitted
  }else{
    ok_lines <- no_cut[c("end_oid","start_oid","edge_id","weight" )] # this is line 328
  }

If I'm reading that code right, the no_cut object isn't defined when sum(!test) > 0 isn't TRUE. I think the object no_cut was previously created in line 208 (inside the all_multi_lignes() function). But that line is now commented out.

jdjohn215 avatar Apr 22 '24 14:04 jdjohn215