# 99 bottles of beer on the wall # For R-2.6.1 and later (possibly some earlier as well) # D. Dailey, 3 May 2008 # The strategy: Build a data frame with the lyrics, then # First: Individual phrases bottles <- c( rep( 'bottles', 98), 'bottle', 'bottles' ) beerFrame <- data.frame( FirstPhrase = sprintf( '%s %s of beer on the wall', c( 99:1, "No more" ), bottles ), SecondPhrase = sprintf( '%s %s of beer', c( 99:1, "no more" ), bottles ), ThirdPhrase = sprintf( 'Take one down and pass it around'), LastPhrase = sprintf( '%s bottles of beer on the