Why is $\Delta G=-nFE?$


I don't understand what the motivation is behind this definition. Was it derived or just given? The textbook provides no justification for this equation. In fact, much of the book associated with the Gibbs free energy provides no justification and just says, 'This is how it is. Now go and solve some problems.'


Question: Passing a string as function argument
Answer: Edit: Within your function code drop the label(.) and deparse(substitute(.)) attempts and use this:

dimnames = setNames( list(  c("Disapprove", "Approve"),  
                            c("Disapprove", "Approve")), 
                     c(class1, class2) )