(Feel free to edit.)
The following functions should be handled with care (which does not necessarily mean they are not suitable for programming):
Functions whose outputs do not have a consistent output class depending on the inputs:
sapply
,mapply
(by default)Functions whose internal behavior is different depending on the input length:
sample
,seq
Functions that evaluate some of their arguments within environments:
$
,subset
,with
,within
,transform
.Functions that go against normal environment usage:
attach
,detach
,assign
,<<-
Functions that allow partial matching:
$
Functions that only make sense in interactive usage:
browser
,recover
,debug
,debugonce
,edit
,fix
,menu
,select.list
Functions that can be a threat (virus) if used with user inputs:
source
,eval(parse(text=...))
,system
.
Also, to some extent, every function that generates warnings rather than errors. I recommend using options(warn = 2)
to turn all warnings into errors in a programming application. Specific cases can then be allowed via suppressWarnings
or try
.