tests/testthat/bad3/R/package.R

f <- function(x) {

  ## This is bad practice, oh no!
  for (i in 1:length(x)) i

  for (i in 1:nrow(x)) i

  for (i in 1:ncol(x)) i

  for (i in 1:NROW(x)) i

  for (i in 1:NCOL(x)) i
}

Try the goodpractice package in your browser

Any scripts or data that you put into this service are public.

goodpractice documentation built on Aug. 31, 2022, 1:05 a.m.