Skip to content

Instantly share code, notes, and snippets.

@ajdamico
Created March 6, 2012 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajdamico/1983607 to your computer and use it in GitHub Desktop.
Save ajdamico/1983607 to your computer and use it in GitHub Desktop.
let R sing the beatles
title = "Let it be"
wow = "words of wisdom"
Verse.1 =
c( "When I find myself in times of trouble" ,
"Mother Mary comes to me" ,
paste( "Speaking" , wow ) ,
title )
Verse.2 =
c( "And in my hour of darkness" ,
"She is standing right in front of me" ,
paste( "Speaking" , wow ) ,
title )
for ( i in 1:2 )
for ( j in get(
paste( "Verse." , i , sep = "" ) ) )
print( j )
for ( i in 1:6 )
print(
ifelse( i %in% 5 ,
paste( "Whisper" , wow ) ,
title ) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment