Browse files

Fix spaces; remove last if

  • Loading branch information...
1 parent 32b37c2 commit bae322e39bf5eb1d45e5ddda34d40146e52440ac @joranE joranE committed with wch Jun 24, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 R/utilities-help.r
View
8 R/utilities-help.r
@@ -1,16 +1,14 @@
aesthetics <- function(x) {
req_aes <- x$required_aes
def_aes <- names(x$default_aes())
- def_aes <- setdiff(def_aes,req_aes)
+ def_aes <- setdiff(def_aes, req_aes)
if (length(req_aes) == 0){
return(sort(names(x$default_aes())))
}
if (length(def_aes) == 0){
- return(paste("\\strong{",sort(x$required_aes),"}",sep = ""))
- }
- if (length(req_aes) > 0 & length(def_aes) > 0){
- return(c(paste("\\strong{",sort(x$required_aes),"}",sep = ""), sort(def_aes)))
+ return(paste("\\strong{", sort(x$required_aes), "}",sep = ""))
}
+ return(c(paste("\\strong{",sort(x$required_aes), "}", sep = ""), sort(def_aes)))
}
geom_aesthetics <- function(x) {
aesthetics(Geom$find(x))

0 comments on commit bae322e

Please sign in to comment.