r - why does the `View` function takes so long to run? -
i utilize view
function in rstudio see if info loaded correctly. but, when info "big" function takes lot of time run.
this timing 2mm rows , 9 column data.frame
> system.time(view(bd_cadastral)) user scheme elapsed 3.156 0.004 3.164
in rstudio, function shows first 1000 rows, if view(bd_cadastral[1:1000,]
:
> system.time(view(bd_cadastral[1:1000,])) user scheme elapsed 0.068 0.000 0.089
shouldn't take same time?
if within function, you'll see doesn't straight take subset going show. first tries coerce whole thing info frame , uses lapply
, sapply
on perchance converted input. , @ end, passes whole variable c programme assume subsetting. steps works faster smaller object.
if asking why built way... hell if know. perchance in case limitations of c programme alter or something.
side note: ctrl+click on function leads code. questions can useful
r rstudio
No comments:
Post a Comment