1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# Naming Conventions by Example # Vector Definition names <- c('Alexandre','Jannik','Radim') weights.lb <- c(188, 195, 194) # Data Frame Definition canucks.forwards <- data.frame(Name = names, WeightLb = weights.lb) # Function Definition convertLbToKg <- function(people) { people$WeightKg <- people$WeightLb * 0.45359237 return(people) } canucks.forwards <- convertLbToKg(canucks.forwards) |
I haven’t been able to find a good agreed-upon naming convention for R therefore, I attempt to create one, for myself and anyone who is interested.