[R] about .function

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Jan 30 20:18:15 CET 2020


On 30/01/2020 1:38 p.m., Bogdan Tanasa wrote:
> Dear all,
> 
> if I may ask please a very simple question :
> 
> what does "." mean in front of  function name : an example below . thank
> you very much !
> 
> .set_pbmc_color_11<-function() {
>    myColors <- c( "dodgerblue2",
>                   "green4",
>                   "#6A3D9A", # purple
>                   "grey",
>                   "tan4",
>                   "yellow",
>                   "#FF7F00", # orange
>                   "black",
>                   "#FB9A99", # pink
>                   "orchid",
>                   "red")
> 

It means that the default ls() won't list the function, you'd need 
ls(all.names = TRUE).  By convention such functions are usually meant 
for internal use, but there are lots of exceptions to that convention.
The same convention is used in Unix-alike file systems.

Duncan Murdoch



More information about the R-help mailing list