Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Function Definition Layout

20200105

resume
Align function arguments in a function definition one per line. Aligning the = is also recommended to make it easier to view what is going on by presenting the assignments as a table.

Preferred

show_dial_plot <- function(label       = "UseR!",
                           value       = 78,
                           label_cex   = 3,
                           label_color = "black")
{
  ...
}

Alternatives

show_dial_plot <- function(label="UseR!",
                           value=78,
                           label_cex=3,
                           label_color="black")
{
  ...
}

show_dial_plot <- function(
                    label="UseR!",
                    value=78,
                    label_cex=3,
                    label_color="black"
                  )

Discouraged

show_dial_plot <- function(label="UseR!", value=78,
                           label_cex=3,
                           label_color="black")
{
  ...
}

show_dial_plot <- function(label="UseR!",
  value=78,
  label_cex=3,
  label_color="black")


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.